(
    text: str, lang: types.LangLike, chunk_size: int = 100000
)
return Doc.from_docs(docs)
Make a single spaCy-processed document from 1 or more chunks of ``text``.
    This is a workaround for processing very long texts, for which spaCy
    is unable to allocate enough RAM.

    Args:
        text: Text document to be chunked and processed by spaCy.
        lang: Language with which spaCy processes ``text``, represented as
            the full name of or path on disk to the pipeline, or
            an already instantiated pipeline instance.
        chunk_size: Number of characters comprising each text chunk
            (excluding the last chunk, which is probably smaller).
            For best performance, value should be somewhere between 1e3 and 1e7,
            depending on how much RAM you have available.

            .. note:: Since chunking is done by character, chunks edges' probably
               won't respect natural language segmentation, which means that every
               ``chunk_size`` characters, spaCy's models may make mistakes.

    Returns:
        A single processed document, built from concatenated text chunks.
Make a single spaCy-processed document from 1 or more chunks of ``text``.
    This is a workaround for processing very long texts, for which spaCy
    is unable to allocate enough RAM.
Make a single spaCy - processed document from 1 or more chunks of text . This is a workaround for processing very long texts for which spaCy is unable to allocate enough RAM .
def make_doc_from_text_chunks(
    text: str, lang: types.LangLike, chunk_size: int = 100000
) -> Doc:
    """
    Make a single spaCy-processed document from 1 or more chunks of ``text``.
    This is a workaround for processing very long texts, for which spaCy
    is unable to allocate enough RAM.

    Args:
        text: Text document to be chunked and processed by spaCy.
        lang: Language with which spaCy processes ``text``, represented as
            the full name of or path on disk to the pipeline, or
            an already instantiated pipeline instance.
        chunk_size: Number of characters comprising each text chunk
            (excluding the last chunk, which is probably smaller).
            For best performance, value should be somewhere between 1e3 and 1e7,
            depending on how much RAM you have available.

            .. note:: Since chunking is done by character, chunks edges' probably
               won't respect natural language segmentation, which means that every
               ``chunk_size`` characters, spaCy's models may make mistakes.

    Returns:
        A single processed document, built from concatenated text chunks.
    """
    utils.deprecated(
        "This function is deprecated, and will be removed in a future version. "
        "Instead, use the usual :func:`textacy.make_spacy_doc()` "
        "and specify a non-null `chunk_size`",
        action="once",
    )
    lang = resolve_langlike(lang)
    text_chunks = (text[i : i + chunk_size] for i in range(0, len(text), chunk_size))
    docs = list(lang.pipe(text_chunks))
    return Doc.from_docs(docs)
def make_doc_from_text_chunks ( text : str , lang : types . LangLike , chunk_size : int = 100000 ) -> Doc : utils . deprecated ( "This function is deprecated, and will be removed in a future version. " "Instead, use the usual :func:`textacy.make_spacy_doc()` " "and specify a non-null `chunk_size`" , action = "once" , ) lang = resolve_langlike ( lang ) text_chunks = ( text [ i : i + chunk_size ] for i in range ( 0 , len ( text ) , chunk_size ) ) docs = list ( lang . pipe ( text_chunks ) ) return Doc . from_docs ( docs )