(
    ns: List[int],
    max_chars: int,
    lower: bool,
    num_vectors: int | List[int],
    embed_dims: int | List[int],
    dropout: Optional[float],
)
return model
Args:
        ns
        max_chars
        lower
        num_vectors
        embed_dims
        dropout
Args:
        ns
        max_chars
        lower
        num_vectors
        embed_dims
        dropout
Args : ns max_chars lower num_vectors embed_dims dropout
def MultiCharNgramsEmbedding(
    ns: List[int],
    max_chars: int,
    lower: bool,
    num_vectors: int | List[int],
    embed_dims: int | List[int],
    dropout: Optional[float],
) -> Model[List[str], thinc.types.Floats1d]:
    """
    Args:
        ns
        max_chars
        lower
        num_vectors
        embed_dims
        dropout
    """
    numn = len(ns)
    num_vectors = [num_vectors] * numn if isinstance(num_vectors, int) else num_vectors
    embed_dims = [embed_dims] * numn if isinstance(embed_dims, int) else embed_dims
    with Model.define_operators({">>": chain}):
        model = concatenate(
            *[
                CharNgramsEmbedding(
                    n=n,
                    max_chars=max_chars,
                    lower=lower,
                    num_vectors=nvec,
                    embed_dim=edim,
                    dropout=dropout,
                )
                for n, nvec, edim in zip(ns, num_vectors, embed_dims)
            ]
        )
    return model
def MultiCharNgramsEmbedding ( ns : List [ int ] , max_chars : int , lower : bool , num_vectors : int | List [ int ] , embed_dims : int | List [ int ] , dropout : Optional [ float ] , ) -> Model [ List [ str ] , thinc . types . Floats1d ] : numn = len ( ns ) num_vectors = [ num_vectors ] * numn if isinstance ( num_vectors , int ) else num_vectors embed_dims = [ embed_dims ] * numn if isinstance ( embed_dims , int ) else embed_dims with Model . define_operators ( { ">>" : chain } ) : model = concatenate ( * [ CharNgramsEmbedding ( n = n , max_chars = max_chars , lower = lower , num_vectors = nvec , embed_dim = edim , dropout = dropout , ) for n , nvec , edim in zip ( ns , num_vectors , embed_dims ) ] ) return model