{
  "id": "task_libraries:nlp/python",
  "path": "/exapedia/python-nlp-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python NLP libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python NLP (natural language processing) libraries split text into words and sentences, label them, and turn them into numbers that models can use. These libraries handle the text steps inside search engines, document tagging, and the embedding step of retrieval for AI agents."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python NLP libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#transformers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F102"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F103"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F111"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F106"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F104"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#nltk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F120"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F121"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F124"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F122"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#spacy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F136"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sentence-transformers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F152"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jieba",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F171"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#textblob",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F190"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#gensim",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F208"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fasttext",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F225"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#nltk",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F2"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Text classifier training",
            "Linguistic token labels"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#transformers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F102"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F112"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F113"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#nltk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F120"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#spacy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F136"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sentence-transformers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F152"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jieba",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F171"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#textblob",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F190"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#gensim",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F208"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fasttext",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F225"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "transformers",
          "name": [
            {
              "t": "fact",
              "fact": "F102"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/huggingface/transformers"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/transformers"
            },
            {
              "label": "Docs",
              "href": "https://huggingface.co/docs/transformers/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Transformers loads pretrained language models from the Hugging Face Hub and runs them for tasks such as text classification. "
            },
            {
              "t": "code",
              "text": "pipeline"
            },
            {
              "t": "text",
              "text": " pairs a model with its tokenizer. One call on a sentence returns a label and a score. Fine-tuning uses the same model classes, and training frameworks and inference engines reuse the model definitions. The library runs on PyTorch."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F103"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F111"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F105"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F104"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://huggingface.co/docs/transformers/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F102"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Models by name"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "A task and a model name from the Hub are enough for "
                },
                {
                  "t": "code",
                  "text": "pipeline"
                },
                {
                  "t": "text",
                  "text": " to download and run a model."
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Weights download on first use"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Each model fetches its weights the first time it loads, and large models need a GPU with enough memory to hold them."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F118"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F119"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/deepset-ai/haystack",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F118"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def run(self, text: str) -> dict[str, str]:\n    \"\"\"\n    Routes the text strings to different connections based on a category label.\n\n    :param text: A string of text to route.\n    :returns:\n        A dictionary with the label as key and the text as value.\n\n    :raises TypeError:\n        If the input is not a str.\n    :raises RuntimeError:\n        If the pipeline has not been loaded because warm_up() was not called before.\n    \"\"\"\n    if self.pipeline is None:\n        raise RuntimeError(\n            \"The component TransformersZeroShotTextRouter wasn't warmed up. Run 'warm_up()' before calling 'run()'.\"\n        )\n\n    if not isinstance(text, str):\n        raise TypeError(\"TransformersZeroShotTextRouter expects a str as input.\")\n\n    prediction = self.pipeline([text], candidate_labels=self.labels, multi_label=self.multi_label)\n    predicted_scores = prediction[0][\"scores\"]\n    max_score_index = max(range(len(predicted_scores)), key=predicted_scores.__getitem__)\n    label = prediction[0][\"labels\"][max_score_index]\n    return {label: text}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/deepset-ai/haystack/blob/dc1d72228adeaac8e657d3a4946c3e246d45784d/haystack/components/routers/zero_shot_text_router.py#L192-L217",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F117"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=transformers%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F102"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from transformers import pipeline\n\nclassifier = pipeline(model=\"distilbert/distilbert-base-uncased-finetuned-sst-2-english\")\nclassifier(\"This movie is disgustingly good !\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/transformers/blob/v5.23.0/src/transformers/pipelines/text_classification.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "text_classification.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F107"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "nltk",
          "name": [
            {
              "t": "fact",
              "fact": "F120"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/nltk/nltk"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/nltk"
            },
            {
              "label": "Docs",
              "href": "https://www.nltk.org/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "NLTK, the Natural Language Toolkit, is a suite of Python modules, data sets, and tutorials for natural language processing research and development. "
            },
            {
              "t": "code",
              "text": "nltk.word_tokenize"
            },
            {
              "t": "text",
              "text": " splits text into words, and other modules tag parts of speech, parse sentences, chunk named entities, and classify text. Corpora and lexical resources download separately with "
            },
            {
              "t": "code",
              "text": "nltk.download"
            },
            {
              "t": "text",
              "text": "."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F121"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F123"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F122"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.nltk.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F120"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F12"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Resources download separately"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Tokenizer models, taggers, and corpora each need "
                },
                {
                  "t": "code",
                  "text": "nltk.download"
                },
                {
                  "t": "text",
                  "text": " before first use."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/miso-belica/sumy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F134"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _get_sentence_tokenizer(self, language):\n    if language in self.SPECIAL_SENTENCE_TOKENIZERS:\n        return self.SPECIAL_SENTENCE_TOKENIZERS[language]\n    try:\n        return nltk.tokenize.PunktTokenizer(language)\n    except (LookupError, zipfile.BadZipfile) as e:\n        raise LookupError(\n            \"NLTK tokenizers are missing or the language is not supported.\\n\"\n            \"\"\"Download them by following command: python -c \"import nltk; nltk.download('punkt_tab')\"\\n\"\"\"\n            \"Original error was:\\n\" + str(e)\n        )\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/miso-belica/sumy/blob/37837583eaa6686e14241c28ef7fdea1369879f6/sumy/nlp/tokenizers.py#L196-L206",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F133"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20nltk&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F120"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import nltk\nsentence = \"\"\"At eight o'clock on Thursday morning\nArthur didn't feel very good.\"\"\"\ntokens = nltk.word_tokenize(sentence)\nprint(tokens)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.nltk.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F125"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "spacy",
          "name": [
            {
              "t": "fact",
              "fact": "F136"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/explosion/spaCy"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/spacy"
            },
            {
              "label": "Docs",
              "href": "https://spacy.io/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "spaCy processes text through a pipeline of components that tokenize, tag parts of speech, parse dependencies, recognize named entities, and classify text. "
            },
            {
              "t": "code",
              "text": "spacy.load"
            },
            {
              "t": "text",
              "text": " loads a trained pipeline such as "
            },
            {
              "t": "code",
              "text": "en_core_web_sm"
            },
            {
              "t": "text",
              "text": ", and calling it on a string returns a "
            },
            {
              "t": "code",
              "text": "Doc"
            },
            {
              "t": "text",
              "text": " that holds every token and its labels. Pipelines can include pretrained transformers such as BERT, and spaCy supports tokenization and training for more than seventy languages."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://spacy.io/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F136"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F36"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F37"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Labels need a trained pipeline"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Statistical tags and entities come from a trained pipeline, which installs as a separate package."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/medspacy/medspacy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F150"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def load(\n    model: Union[Literal[\"default\"], str, Language] = \"default\",\n    medspacy_enable: Union[Literal[\"all\", \"default\"], Iterable[str]] = \"default\",\n    medspacy_disable: Optional[Iterable[str]] = None,\n    language_code: str = \"en\",\n    load_rules: bool = True,\n    quickumls_path: Optional[str] = None,\n    **model_kwargs,\n):\n    \"\"\"Load a spaCy language object with medSpaCy pipeline components.\n    By default, the base model will be a blank 'en' model with the\n    following components:\n        - \"medspacy_tokenizer\": A customized, more aggressive tokenizer than the default spaCy tokenizer. This is set to\n            `nlp.tokenizer` and is not loaded as a pipeline component.\n        - \"medspacy_pyrush\": PyRuSH Sentencizer for sentence splitting\n        - \"medspacy_target_matcher\": TargetMatcher for extended pattern matching\n        - \"medspacy_context\": ConText for attribute assertion\n        - \"medspacy_quickumls\": QuickUMLS for UMLS concept mapping\n    Args:\n        model: The base spaCy model to load. If 'default', will instantiate from a blank 'en' model. If it is a spaCy\n            language model, then it will simply add medspaCy components to the existing pipeline. If it is a string\n            other than 'default', passes the string to spacy.load(model, **model_kwargs).\n        medspacy_enable: Specifies which components to enable in the medspacy pipeline. If \"default\", will load all components\n            found in `DEFAULT_PIPE_NAMES`. These represent the simplest components used in a clinical NLP pipeline:\n            tokenization, sentence detection, concept identification, and ConText. If \"all\", all components in medspaCy\n            will be loaded. If a collection of strings, the components specified will be loaded.\n        medspacy_disable: A collection of component names to exclude. Requires \"all\" is the value for `enable`.\n        language_code: Language code to use (ISO code) as a default for loading additional resources.  See documentation\n            and also the /resources directory to see which resources might be available in each language.\n            Default is \"en\" for English.\n        load_rules: Whether to include default rules for available components. If True, sectionizer and context will\n            both be loaded with default rules. Default is True.\n        quickumls_path: Path to QuickUMLS dictionaries if it is included in the pipeline.\n        model_kwargs: Optional model keyword arguments to pass to spacy.load().\n\n    Returns:\n        A spaCy Language object containing the specified medspacy components.\n    \"\"\"\n\n    medspacy_enable, medspacy_disable = _build_pipe_names(\n        medspacy_enable, medspacy_disable\n    )\n\n    if model == \"default\":\n        nlp = spacy.blank(\"en\")\n    elif isinstance(model, Language):\n        nlp = model\n    elif isinstance(model, str):\n        nlp = spacy.load(model, **model_kwargs)\n    else:\n        raise ValueError(\n            \"model must be either 'default' or an actual spaCy Language object, not \",\n            type(model),\n        )\n\n    if \"medspacy_tokenizer\" in medspacy_enable:\n        from .custom_tokenizer import create_medspacy_tokenizer\n\n        medspacy_tokenizer = create_medspacy_tokenizer(nlp)\n        nlp.tokenizer = medspacy_tokenizer\n\n    if \"medspacy_preprocessor\" in medspacy_enable:\n        from .preprocess import Preprocessor\n\n        preprocessor = Preprocessor(nlp.tokenizer)\n        nlp.tokenizer = preprocessor\n\n    if \"medspacy_pyrush\" in medspacy_enable:\n        pyrush_path = path.join(\n            Path(__file__).resolve().parents[1], \"resources\", language_code.lower(), \"rush_rules.tsv\"\n        )\n        nlp.add_pipe(\"medspacy_pyrush\", config={\"rules_path\": pyrush_path})\n\n    if \"medspacy_target_matcher\" in medspacy_enable:\n        nlp.add_pipe(\"medspacy_target_matcher\")\n\n    if \"medspacy_quickumls\" in medspacy_enable:\n        if quickumls_path is None:\n            quickumls_path = get_quickumls_demo_dir(language_code)\n\n            logger.info(\n                \"Loading QuickUMLS resources from a Medspacy-distributed SAMPLE of UMLS data from here: {}\".format(\n                    quickumls_path\n                )\n            )\n\n        nlp.add_pipe(\"medspacy_quickumls\", config={\"quickumls_fp\": quickumls_path})\n\n    if \"medspacy_context\" in medspacy_enable:\n        if load_rules is True:\n            config = {'language_code': language_code}\n        else:\n            config = {\"rules\": None,\n                      'language_code': language_code}\n        nlp.add_pipe(\"medspacy_context\", config=config)\n\n    if \"medspacy_sectionizer\" in medspacy_enable:\n        if load_rules is True:\n            config = {'language_code': language_code}\n        else:\n            config = {\"rules\": None,\n                      'language_code': language_code}\n        nlp.add_pipe(\"medspacy_sectionizer\", config=config)\n\n    if \"medspacy_postprocessor\" in medspacy_enable:\n        nlp.add_pipe(\"medspacy_postprocessor\")\n\n    if \"medspacy_doc_consumer\" in medspacy_enable:\n        nlp.add_pipe(\"medspacy_doc_consumer\")\n\n    return nlp\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/medspacy/medspacy/blob/b7bb7d82f2e8fbadc9ab26d6b4c37578f8883c2c/medspacy/util.py#L37-L147",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20spacy&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F136"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import spacy\nnlp = spacy.load(\"en_core_web_sm\")\ndoc = nlp(\"This is a sentence.\")\nprint([(w.text, w.pos_) for w in doc])\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://spacy.io/usage/models",
                  "label": [
                    {
                      "t": "text",
                      "text": "models.mdx"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F141"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "sentence-transformers",
          "name": [
            {
              "t": "fact",
              "fact": "F152"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/huggingface/sentence-transformers"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/sentence-transformers"
            },
            {
              "label": "Docs",
              "href": "https://sbert.net/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Sentence Transformers computes embeddings, vectors that place texts with similar meaning close together, using pretrained models from Hugging Face. "
            },
            {
              "t": "code",
              "text": "SentenceTransformer"
            },
            {
              "t": "text",
              "text": " loads a model, "
            },
            {
              "t": "code",
              "text": "encode"
            },
            {
              "t": "text",
              "text": " turns a list of sentences into embeddings, and "
            },
            {
              "t": "code",
              "text": "similarity"
            },
            {
              "t": "text",
              "text": " compares them. Cross-encoder models score pairs of texts for reranking, and sparse encoder models produce sparse embeddings. The same library trains and fine-tunes these models."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://sbert.net/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F152"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Pretrained models by name"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "More than fifteen thousand pretrained models on Hugging Face load by name."
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Models download on first use"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Each model downloads from Hugging Face the first time it loads."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/chroma-core/chroma",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F169"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def __call__(self, input: Documents) -> Embeddings:\n    \"\"\"Generate embeddings for the given documents.\n\n    Args:\n        input: Documents to generate embeddings for.\n\n    Returns:\n        Embeddings for the documents.\n    \"\"\"\n    embeddings = self._model.encode(\n        list(input),\n        convert_to_numpy=True,\n        normalize_embeddings=self.normalize_embeddings,\n    )\n\n    return [np.array(embedding, dtype=np.float32) for embedding in embeddings]\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/chroma-core/chroma/blob/1a3ac2c7c623adbd03ed2508dc27b98cdf26016d/chromadb/utils/embedding_functions/sentence_transformer_embedding_function.py#L53-L68",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F168"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=sentence-transformers%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F152"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from sentence_transformers import SentenceTransformer\r\n\r\n# 1. Load a pretrained Sentence Transformer model\r\nmodel = SentenceTransformer(\"sentence-transformers/all-MiniLM-L6-v2\")\r\n\r\n# The sentences to encode\r\nsentences = [\r\n    \"The weather is lovely today.\",\r\n    \"It's so sunny outside!\",\r\n    \"He drove to the stadium.\",\r\n]\r\n\r\n# 2. Calculate embeddings by calling model.encode()\r\nembeddings = model.encode(sentences)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.sbert.net/docs/quickstart.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "quickstart.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F157"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "jieba",
          "name": [
            {
              "t": "fact",
              "fact": "F171"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/fxsjy/jieba"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/jieba"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Jieba segments Chinese text into words, which Chinese writing does not separate with spaces. "
            },
            {
              "t": "code",
              "text": "jieba.cut"
            },
            {
              "t": "text",
              "text": " runs in accurate mode by default, full mode lists every possible word, and search engine mode splits long words again to improve recall. Custom dictionaries add domain terms, and the segmenter also handles Traditional Chinese."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/fxsjy/jieba",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F171"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Custom dictionaries"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "A user dictionary adds names and terms that the default dictionary misses."
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Paddle mode needs PaddlePaddle"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "The deep learning mode requires the separate paddlepaddle-tiny package."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/PaddlePaddle/PaddleNLP",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F188"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def cut(self, sentence, cut_all=False, use_hmm=True):\n    \"\"\"\n    The method used to cut the text to tokens.\n\n    Args:\n        sentence(str): The text that needs to be cut.\n        cut_all(bool, optional): Whether to use the full mode. If True,\n            using full mode that gets all the possible words from the\n            sentence, which is fast but not accurate. If False, using\n            accurate mode that attempts to cut the sentence into the most\n            accurate segmentations, which is suitable for text analysis.\n            Default: False.\n        use_hmm(bool, optional): Whether to use the HMM model. Default: True.\n\n    Returns:\n        list[str]: A list of tokens.\n\n    Example:\n        .. code-block:: python\n\n            from paddlenlp.data import Vocab, JiebaTokenizer\n            # The vocab file. The sample file can be downloaded firstly.\n            # wget https://bj.bcebos.com/paddlenlp/data/senta_word_dict.txt\n            vocab_file_path = './senta_word_dict.txt'\n            # Initialize the Vocab\n            vocab = Vocab.load_vocabulary(\n                vocab_file_path,\n                unk_token='[UNK]',\n                pad_token='[PAD]')\n            tokenizer = JiebaTokenizer(vocab)\n\n            tokens = tokenizer.cut('我爱你中国')\n            print(tokens)\n            # ['我爱你', '中国']\n    \"\"\"\n    return self.tokenizer.lcut(sentence, cut_all, use_hmm)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/PaddlePaddle/PaddleNLP/blob/3f87dac9b719f75399f92f8bf634ae2ef0611832/paddlenlp/data/tokenizer.py#L56-L91",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F187"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=jieba%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F171"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import jieba\nseg_list = jieba.cut(\"我来到北京清华大学\", cut_all=False)\nprint(\"Default Mode: \" + \"/ \".join(seg_list))  # 精确模式\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/fxsjy/jieba/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F176"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "textblob",
          "name": [
            {
              "t": "fact",
              "fact": "F190"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/sloria/TextBlob"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/textblob"
            },
            {
              "label": "Docs",
              "href": "https://textblob.readthedocs.io/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "TextBlob wraps NLTK and pattern in a single object for common text tasks. "
            },
            {
              "t": "code",
              "text": "TextBlob(text)"
            },
            {
              "t": "text",
              "text": " exposes part-of-speech tags, noun phrases, sentences, and a sentiment score with polarity and subjectivity. The library also tokenizes text and trains Naive Bayes and decision tree classifiers."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://textblob.readthedocs.io/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F190"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "One object for common tasks"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Tags, noun phrases, and sentiment come from attributes on the same "
                },
                {
                  "t": "code",
                  "text": "TextBlob"
                },
                {
                  "t": "text",
                  "text": " object."
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Built on NLTK data"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "TextBlob relies on NLTK corpora, which download separately before first use."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Roibal/Cryptocurrency-Trading-Bots-Python-Beginner-Advance",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F206"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def get_tweet_sentiment(self, tweet):\n    '''\n    Utility function to classify sentiment of passed tweet\n    using textblob's sentiment method\n    '''\n    # create TextBlob object of passed tweet text\n    analysis = TextBlob(self.clean_tweet(tweet))\n    # set sentiment\n    if analysis.sentiment.polarity > 0:\n        return 'positive'\n    elif analysis.sentiment.polarity == 0:\n        return 'neutral'\n    else:\n        return 'negative'\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Roibal/Cryptocurrency-Trading-Bots-Python-Beginner-Advance/blob/6cd9f639ac7f9d914d556738ca3aeeef53618146/Crypto-Trading-Bots/Crypto_Sentiment_Analysis_SocialMedia_Bot.py#L79-L92",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F205"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=textblob%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F190"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from textblob import TextBlob\ntestimonial = TextBlob(\"Textblob is amazingly simple to use. What great fun!\")\nprint(testimonial.sentiment)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://textblob.readthedocs.io/en/dev/quickstart.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "quickstart.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F195"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "gensim",
          "name": [
            {
              "t": "fact",
              "fact": "F208"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/piskvorky/gensim"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/gensim"
            },
            {
              "label": "Docs",
              "href": "https://radimrehurek.com/gensim/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Gensim builds topic models and word vectors from large collections of documents. Its algorithms, including word vector training, LDA, and LSA, stream documents from disk, so a corpus larger than RAM can be processed. "
            },
            {
              "t": "code",
              "text": "gensim.downloader"
            },
            {
              "t": "text",
              "text": " loads pretrained vectors such as GloVe by name, and "
            },
            {
              "t": "code",
              "text": "most_similar"
            },
            {
              "t": "text",
              "text": " returns the nearest words. LSA and LDA can also run on a cluster of computers."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://radimrehurek.com/gensim/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F208"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F58"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F59"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F60"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F61"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Features must match training"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "New documents need the same preprocessing and dictionary as the training corpus."
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Maintenance mode"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Gensim accepts bug and documentation fixes but takes no new features."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/MIND-Lab/OCTIS",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F223"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def train_model(self, dataset, hyperparams=None, top_words=10):\n    \"\"\"\n    Train the model and return output\n\n    Parameters\n    ----------\n    dataset : dataset to use to build the model\n    hyperparams : hyperparameters to build the model\n    top_words : if greater than 0 returns the most significant words for\n                each topic in the output (Default True)\n    Returns\n    -------\n    result : dictionary with up to 3 entries,\n             'topics', 'topic-word-matrix' and\n             'topic-document-matrix'\n    \"\"\"\n    if hyperparams is None:\n        hyperparams = {}\n\n    if self.use_partitions:\n        train_corpus, test_corpus = dataset.get_partitioned_corpus(\n            use_validation=False)\n    else:\n        train_corpus = dataset.get_corpus()\n\n    if self.id2word is None:\n        self.id2word = corpora.Dictionary(dataset.get_corpus())\n\n    if self.id_corpus is None:\n        self.id_corpus = [self.id2word.doc2bow(document)\n                          for document in train_corpus]\n\n    if \"num_topics\" not in hyperparams:\n        hyperparams[\"num_topics\"] = self.hyperparameters[\"num_topics\"]\n\n    # Allow alpha to be a float in case of symmetric alpha\n    if \"alpha\" in hyperparams:\n        if isinstance(hyperparams[\"alpha\"], float):\n            hyperparams[\"alpha\"] = [\n                hyperparams[\"alpha\"]\n            ] * hyperparams[\"num_topics\"]\n\n    hyperparams[\"corpus\"] = self.id_corpus\n    hyperparams[\"id2word\"] = self.id2word\n    self.hyperparameters.update(hyperparams)\n\n    self.trained_model = ldamodel.LdaModel(**self.hyperparameters)\n\n    result = {}\n\n    result[\"topic-word-matrix\"] = self.trained_model.get_topics()\n\n    if top_words > 0:\n        topics_output = []\n        for topic in result[\"topic-word-matrix\"]:\n            top_k = np.argsort(topic)[-top_words:]\n            top_k_words = list(reversed([self.id2word[i] for i in top_k]))\n            topics_output.append(top_k_words)\n        result[\"topics\"] = topics_output\n\n    result[\"topic-document-matrix\"] = self._get_topic_document_matrix()\n\n    if self.use_partitions:\n        new_corpus = [self.id2word.doc2bow(\n            document) for document in test_corpus]\n        if self.update_with_test:\n            self.trained_model.update(new_corpus)\n            self.id_corpus.extend(new_corpus)\n\n            result[\"test-topic-word-matrix\"] = (\n                self.trained_model.get_topics())\n\n            if top_words > 0:\n                topics_output = []\n                for topic in result[\"test-topic-word-matrix\"]:\n                    top_k = np.argsort(topic)[-top_words:]\n                    top_k_words = list(\n                        reversed([self.id2word[i] for i in top_k]))\n                    topics_output.append(top_k_words)\n                result[\"test-topics\"] = topics_output\n\n            result[\"test-topic-document-matrix\"] = (\n                self._get_topic_document_matrix())\n\n        else:\n            test_document_topic_matrix = []\n            for document in new_corpus:\n                document_topics_tuples = self.trained_model[document]\n                document_topics = np.zeros(\n                    self.hyperparameters[\"num_topics\"])\n                for single_tuple in document_topics_tuples:\n                    document_topics[single_tuple[0]] = single_tuple[1]\n\n                test_document_topic_matrix.append(document_topics)\n            result[\"test-topic-document-matrix\"] = np.array(\n                test_document_topic_matrix).transpose()\n    return result\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/MIND-Lab/OCTIS/blob/8f9a0ac5a12e3b72ecd77dcba4f181c77e4595f1/octis/models/LDA.py#L149-L245",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F222"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20gensim&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F208"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import gensim.downloader as api\nmodel = api.load(\"glove-wiki-gigaword-50\")\nmodel.most_similar(\"glass\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://radimrehurek.com/gensim/auto_examples/howtos/run_downloader_api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "run_downloader_api.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F213"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "fasttext",
          "name": [
            {
              "t": "fact",
              "fact": "F225"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/facebookresearch/fastText"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/fasttext"
            },
            {
              "label": "Docs",
              "href": "https://fasttext.cc/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "fastText learns word representations and trains text classifiers. "
            },
            {
              "t": "code",
              "text": "fasttext.train_unsupervised"
            },
            {
              "t": "text",
              "text": " learns word vectors from a text file, and "
            },
            {
              "t": "code",
              "text": "fasttext.train_supervised"
            },
            {
              "t": "text",
              "text": " trains a classifier from lines that start with "
            },
            {
              "t": "code",
              "text": "__label__"
            },
            {
              "t": "text",
              "text": " tags. Vectors are built from character n-grams, so words outside the training vocabulary still get a vector."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://fasttext.cc/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F225"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Pretrained word vectors"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Facebook publishes word vectors for a hundred and fifty-seven languages, trained on Wikipedia and Common Crawl."
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Language identification"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "A downloadable model identifies the language of a text."
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Compiled during install"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "The package compiles C++ code when it installs and builds on macOS and Linux."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mlfoundations/dclm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F241"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def main():\n    args = get_args()\n    random.seed(args.seed)\n    train_input = args.input\n\n    train_was_split = False\n    if args.valid_input:\n        valid_input = args.valid_input\n    elif args.valid_frac > 0:\n        train_input, valid_input = split_train_val(train_input, args.valid_frac)\n        train_was_split = True\n    else:\n        valid_input = None\n\n    hyperparams = {'lr': args.lr, 'dim': args.dim, 'ws': args.ws, 'epoch': args.epoch, 'minCount': args.minCount, 'wordNgrams': args.wordNgrams}\n    model = fasttext.train_supervised(input=train_input, **hyperparams)\n\n    print(\"Training results\")\n    print_results(*model.test(train_input))\n\n    if valid_input is not None:\n        print(\"Validation results\")\n        print_results(*model.test(valid_input))\n\n    # Save the model\n    output = args.name if args.name.endswith(\".bin\") else args.name + \".bin\"\n    model.save_model(os.path.join(args.output_dir, output))\n\n    if train_was_split:\n        os.remove(train_input)\n        os.remove(valid_input)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mlfoundations/dclm/blob/361714bdd60bb9b7f4b2d8354cebbf0dec0c329e/baselines/train_fasttext_classifier.py#L55-L85",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F240"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=fasttext%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F225"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import fasttext\nmodel = fasttext.train_supervised('data.train.txt')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://fasttext.cc/docs/en/python-module.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "python-module.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F230"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python NLP library should I use?",
      "a": [
        {
          "t": "text",
          "text": "For a pipeline that tags, parses, and finds entities, "
        },
        {
          "t": "link",
          "href": "#spacy",
          "label": [
            {
              "t": "text",
              "text": "spaCy"
            }
          ]
        },
        {
          "t": "text",
          "text": " loads a trained pipeline in one call. "
        },
        {
          "t": "link",
          "href": "#nltk",
          "label": [
            {
              "t": "text",
              "text": "NLTK"
            }
          ]
        },
        {
          "t": "text",
          "text": " collects many separate algorithms and corpora for research and teaching. For embeddings and semantic search, "
        },
        {
          "t": "link",
          "href": "#sentence-transformers",
          "label": [
            {
              "t": "text",
              "text": "Sentence Transformers"
            }
          ]
        },
        {
          "t": "text",
          "text": " encodes text with pretrained models, and "
        },
        {
          "t": "link",
          "href": "#transformers",
          "label": [
            {
              "t": "text",
              "text": "Transformers"
            }
          ]
        },
        {
          "t": "text",
          "text": " runs pretrained models for classification and other tasks."
        }
      ]
    },
    {
      "q": "What is Sentence Transformers?",
      "a": [
        {
          "t": "link",
          "href": "#sentence-transformers",
          "label": [
            {
              "t": "text",
              "text": "Sentence Transformers"
            }
          ]
        },
        {
          "t": "text",
          "text": " computes embeddings, vectors that place similar texts close together, with pretrained models from Hugging Face. "
        },
        {
          "t": "code",
          "text": "model.encode"
        },
        {
          "t": "text",
          "text": " turns a list of sentences into embeddings, and cross-encoder models score pairs of texts for reranking. Uses include semantic search, semantic textual similarity, and paraphrase mining."
        }
      ]
    },
    {
      "q": "NLTK vs spaCy: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "NLTK is a toolkit of separate algorithms, corpora, and lexical resources, each downloaded as needed. spaCy runs text through one pipeline of trained components that tags, parses, and labels entities, and returns a "
        },
        {
          "t": "code",
          "text": "Doc"
        },
        {
          "t": "text",
          "text": " object holding every annotation."
        }
      ]
    },
    {
      "q": "What are spaCy models?",
      "a": [
        {
          "t": "text",
          "text": "spaCy's trained pipelines are packages, such as "
        },
        {
          "t": "code",
          "text": "en_core_web_sm"
        },
        {
          "t": "text",
          "text": ", installed with "
        },
        {
          "t": "code",
          "text": "spacy download"
        },
        {
          "t": "text",
          "text": " and loaded with "
        },
        {
          "t": "code",
          "text": "spacy.load"
        },
        {
          "t": "text",
          "text": ". Statistical tags and entities come from these pipelines, and spaCy supports tokenization and training for more than seventy languages."
        }
      ]
    },
    {
      "q": "How do I use word vectors with Gensim?",
      "a": [
        {
          "t": "link",
          "href": "#gensim",
          "label": [
            {
              "t": "text",
              "text": "Gensim"
            }
          ]
        },
        {
          "t": "text",
          "text": " trains word vector models on documents streamed from disk, so the corpus can be larger than memory. Pretrained vectors such as GloVe load by name through "
        },
        {
          "t": "code",
          "text": "gensim.downloader"
        },
        {
          "t": "text",
          "text": ", and "
        },
        {
          "t": "code",
          "text": "most_similar"
        },
        {
          "t": "text",
          "text": " returns the nearest words."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, nltk",
      "display": "NLTK",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, nltk",
      "display": "42.0M",
      "asOf": "2026-11-12"
    },
    "F3": {
      "label": "License, nltk",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, nltk",
      "display": "3.10.4, Oct 2026",
      "asOf": "2026-10-21"
    },
    "F5": {
      "label": "Package release date, nltk",
      "display": "Oct 2026",
      "asOf": "2026-10-21"
    },
    "F6": {
      "label": "Repository stars, nltk",
      "display": "14.8K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Tokenization, nltk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Part-of-speech tagging, nltk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Named entities, nltk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Install, nltk",
      "display": "pip install nltk",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "What it does, nltk",
      "display": "Provides text-processing algorithms alongside corpora and lexical resources.",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "strengths lead, nltk",
      "display": "Offers a broad algorithm toolkit",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths, nltk",
      "display": "Choose tokenization, tagging, parsing, and classification tools alongside corpus resources.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, nltk",
      "display": "Extracts named entity chunks",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, nltk",
      "display": "Run the named-entity chunker on already tagged tokens.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "limitations lead, nltk",
      "display": "Language resources need separate downloads",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations, nltk",
      "display": "Install the tokenizer, tagger, and corpus resources required by your workflow.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "Quickstart, nltk",
      "display": "import nltk\nsentence = \"\"\"At eight o'clock on Thursday morning\nArthur didn't feel very good.\"\"\"\ntokens = nltk.word_tokenize(sentence)\ntokens\ntagged = nltk.pos_tag(tokens)\ntagged[0:6]\nentities = nltk.chunk.ne_chunk(tagged)\nentities\n",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "Project function, nltk",
      "display": "def _get_sentence_tokenizer(self, language):\n    if language in self.SPECIAL_SENTENCE_TOKENIZERS:\n        return self.SPECIAL_SENTENCE_TOKENIZERS[language]\n    try:\n        return nltk.tokenize.PunktTokenizer(language)\n    except (LookupError, zipfile.BadZipfile) as e:\n        raise LookupError(\n            \"NLTK tokenizers are missing or the language is not supported.\\n\"\n            \"\"\"Download them by following command: python -c \"import nltk; nltk.download('punkt_tab')\"\\n\"\"\"\n            \"Original error was:\\n\" + str(e)\n        )\n",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Project function reference, nltk",
      "display": "tokenizers.py · _get_sentence_tokenizer()",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project repository, nltk",
      "display": "miso-belica/sumy",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project stars, miso-belica/sumy",
      "display": "3.7K",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project push date, miso-belica/sumy",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F24": {
      "label": "Library name, spacy",
      "display": "spaCy",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Monthly downloads, spacy",
      "display": "21.0M",
      "asOf": "2026-11-12"
    },
    "F26": {
      "label": "License, spacy",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Package release, spacy",
      "display": "3.8.18, Oct 2026",
      "asOf": "2026-10-26"
    },
    "F28": {
      "label": "Package release date, spacy",
      "display": "Oct 2026",
      "asOf": "2026-10-26"
    },
    "F29": {
      "label": "Repository stars, spacy",
      "display": "34.0K",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Tokenization, spacy",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Part-of-speech tagging, spacy",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Named entities, spacy",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Output formats, spacy",
      "display": "JSON",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Install, spacy",
      "display": "pip install spacy && python -m spacy download en_core_web_sm",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "What it does, spacy",
      "display": "Processes text through configurable linguistic annotation pipelines.",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "strengths lead, spacy",
      "display": "Combines linguistic pipeline components",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "strengths, spacy",
      "display": "Process text with trained tagging, parsing, and entity-recognition components.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, spacy",
      "display": "Serializes annotated documents as JSON",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, spacy",
      "display": "Export token-level annotations through the document JSON API.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "limitations lead, spacy",
      "display": "Predictions require trained pipelines",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "limitations, spacy",
      "display": "Load a trained language pipeline for statistical tags and entities.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "Quickstart, spacy",
      "display": "import spacy\n\nnlp = spacy.load(\"en_core_web_sm\")\nprint(\"Pipeline:\", nlp.pipe_names)\ndoc = nlp(\"I was reading the paper.\")\ntoken = doc[0]  # 'I'\nprint(token.morph)  # 'Case=Nom|Number=Sing|Person=1|PronType=Prs'\nprint(token.morph.get(\"PronType\"))  # ['Prs']\n",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "Project function, spacy",
      "display": "def load(\n    model: Union[Literal[\"default\"], str, Language] = \"default\",\n    medspacy_enable: Union[Literal[\"all\", \"default\"], Iterable[str]] = \"default\",\n    medspacy_disable: Optional[Iterable[str]] = None,\n    language_code: str = \"en\",\n    load_rules: bool = True,\n    quickumls_path: Optional[str] = None,\n    **model_kwargs,\n):\n    # ...\n\n    medspacy_enable, medspacy_disable = _build_pipe_names(\n        medspacy_enable, medspacy_disable\n    )\n\n    if model == \"default\":\n        nlp = spacy.blank(\"en\")\n    elif isinstance(model, Language):\n        nlp = model\n    elif isinstance(model, str):\n        nlp = spacy.load(model, **model_kwargs)\n    else:\n        raise ValueError(\n            \"model must be either 'default' or an actual spaCy Language object, not \",\n            type(model),\n        )\n\n    if \"medspacy_tokenizer\" in medspacy_enable:\n        from .custom_tokenizer import create_medspacy_tokenizer\n\n        medspacy_tokenizer = create_medspacy_tokenizer(nlp)\n        nlp.tokenizer = medspacy_tokenizer\n\n    if \"medspacy_preprocessor\" in medspacy_enable:\n        from .preprocess import Preprocessor\n\n        preprocessor = Preprocessor(nlp.tokenizer)\n        nlp.tokenizer = preprocessor\n\n    if \"medspacy_pyrush\" in medspacy_enable:\n        pyrush_path = path.join(\n            Path(__file__).resolve().parents[1], \"resources\", language_code.lower(), \"rush_rules.tsv\"\n        )\n        nlp.add_pipe(\"medspacy_pyrush\", config={\"rules_path\": pyrush_path})\n\n    if \"medspacy_target_matcher\" in medspacy_enable:\n        nlp.add_pipe(\"medspacy_target_matcher\")\n\n    if \"medspacy_quickumls\" in medspacy_enable:\n        if quickumls_path is None:\n            quickumls_path = get_quickumls_demo_dir(language_code)\n\n            logger.info(\n                \"Loading QuickUMLS resources from a Medspacy-distributed SAMPLE of UMLS data from here: {}\".format(\n                    quickumls_path\n                )\n            )\n\n        nlp.add_pipe(\"medspacy_quickumls\", config={\"quickumls_fp\": quickumls_path})\n\n    if \"medspacy_context\" in medspacy_enable:\n        if load_rules is True:\n            config = {'language_code': language_code}\n        else:\n            config = {\"rules\": None,\n                      'language_code': language_code}\n        nlp.add_pipe(\"medspacy_context\", config=config)\n\n    if \"medspacy_sectionizer\" in medspacy_enable:\n        if load_rules is True:\n            config = {'language_code': language_code}\n        else:\n            config = {\"rules\": None,\n                      'language_code': language_code}\n        nlp.add_pipe(\"medspacy_sectionizer\", config=config)\n\n    if \"medspacy_postprocessor\" in medspacy_enable:\n        nlp.add_pipe(\"medspacy_postprocessor\")\n\n    if \"medspacy_doc_consumer\" in medspacy_enable:\n        nlp.add_pipe(\"medspacy_doc_consumer\")\n\n    return nlp\n",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "Project function reference, spacy",
      "display": "util.py · load()",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Project repository, spacy",
      "display": "medspacy/medspacy",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project stars, medspacy/medspacy",
      "display": "688",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project push date, medspacy/medspacy",
      "display": "Jun 2026",
      "asOf": "2026-06-04"
    },
    "F48": {
      "label": "Library name, gensim",
      "display": "Gensim",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Monthly downloads, gensim",
      "display": "2.9M",
      "asOf": "2026-11-12"
    },
    "F50": {
      "label": "License, gensim",
      "display": "LGPL-2.1-only",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Package release, gensim",
      "display": "4.4.0, Oct 2025",
      "asOf": "2025-10-18"
    },
    "F52": {
      "label": "Package release date, gensim",
      "display": "Oct 2025",
      "asOf": "2025-10-18"
    },
    "F53": {
      "label": "Repository stars, gensim",
      "display": "16.5K",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Tokenization, gensim",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Output formats, gensim",
      "display": "Matrix Market",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Install, gensim",
      "display": "pip install gensim",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "What it does, gensim",
      "display": "Builds document vectors and unsupervised semantic models.",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "strengths lead, gensim",
      "display": "Fits unsupervised semantic models",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "strengths, gensim",
      "display": "Train topic and word-vector models from a corpus of documents.",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "strengths lead, gensim",
      "display": "Streams corpora from disk",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "strengths, gensim",
      "display": "Iterate over corpus documents without loading the entire matrix into memory.",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "limitations lead, gensim",
      "display": "Inference features must match training",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "limitations, gensim",
      "display": "Reuse preprocessing and feature identifiers when transforming new documents.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "Quickstart, gensim",
      "display": "from collections import defaultdict\nfrom gensim import corpora\n\ndocuments = [\n    \"Human machine interface for lab abc computer applications\",\n    \"A survey of user opinion of computer system response time\",\n    \"The EPS user interface management system\",\n    \"System and human system engineering testing of EPS\",\n    \"Relation of user perceived response time to error measurement\",\n    \"The generation of random binary unordered trees\",\n    \"The intersection graph of paths in trees\",\n    \"Graph minors IV Widths of trees and well quasi ordering\",\n    \"Graph minors A survey\",\n]\n\n# remove common words and tokenize\nstoplist = set('for a of the and to in'.split())\ntexts = [\n    [word for word in document.lower().split() if word not in stoplist]\n    for document in documents\n]\n\n# remove words that appear only once\nfrequency = defaultdict(int)\nfor text in texts:\n    for token in text:\n        frequency[token] += 1\n\ntexts = [\n    [token for token in text if frequency[token] > 1]\n    for text in texts\n]\n\ndictionary = corpora.Dictionary(texts)\ncorpus = [dictionary.doc2bow(text) for text in texts]\n\n\nfrom gensim import models\n\ntfidf = models.TfidfModel(corpus)  # step 1 -- initialize a model\n\n\ncorpus_tfidf = tfidf[corpus]\nfor doc in corpus_tfidf:\n    print(doc)\n\n\nlsi_model = models.LsiModel(corpus_tfidf, id2word=dictionary, num_topics=2)  # initialize an LSI transformation\ncorpus_lsi = lsi_model[corpus_tfidf]  # create a double wrapper over the original corpus: bow->tfidf->fold-in-lsi\n\n\nlsi_model.print_topics(2)\n",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "Project function, gensim",
      "display": "def train_model(self, dataset, hyperparams=None, top_words=10):\n    # ...\n    if hyperparams is None:\n        hyperparams = {}\n\n    if self.use_partitions:\n        train_corpus, test_corpus = dataset.get_partitioned_corpus(\n            use_validation=False)\n    else:\n        train_corpus = dataset.get_corpus()\n\n    if self.id2word is None:\n        self.id2word = corpora.Dictionary(dataset.get_corpus())\n\n    if self.id_corpus is None:\n        self.id_corpus = [self.id2word.doc2bow(document)\n                          for document in train_corpus]\n\n    if \"num_topics\" not in hyperparams:\n        hyperparams[\"num_topics\"] = self.hyperparameters[\"num_topics\"]\n\n    # Allow alpha to be a float in case of symmetric alpha\n    if \"alpha\" in hyperparams:\n        if isinstance(hyperparams[\"alpha\"], float):\n            hyperparams[\"alpha\"] = [\n                hyperparams[\"alpha\"]\n            ] * hyperparams[\"num_topics\"]\n\n    hyperparams[\"corpus\"] = self.id_corpus\n    hyperparams[\"id2word\"] = self.id2word\n    self.hyperparameters.update(hyperparams)\n\n    self.trained_model = ldamodel.LdaModel(**self.hyperparameters)\n\n    result = {}\n\n    result[\"topic-word-matrix\"] = self.trained_model.get_topics()\n\n    if top_words > 0:\n        topics_output = []\n        for topic in result[\"topic-word-matrix\"]:\n            top_k = np.argsort(topic)[-top_words:]\n            top_k_words = list(reversed([self.id2word[i] for i in top_k]))\n            topics_output.append(top_k_words)\n        result[\"topics\"] = topics_output\n\n    result[\"topic-document-matrix\"] = self._get_topic_document_matrix()\n\n    if self.use_partitions:\n        new_corpus = [self.id2word.doc2bow(\n            document) for document in test_corpus]\n        if self.update_with_test:\n            self.trained_model.update(new_corpus)\n            self.id_corpus.extend(new_corpus)\n\n            result[\"test-topic-word-matrix\"] = (\n                self.trained_model.get_topics())\n\n            if top_words > 0:\n                topics_output = []\n                for topic in result[\"test-topic-word-matrix\"]:\n                    top_k = np.argsort(topic)[-top_words:]\n                    top_k_words = list(\n                        reversed([self.id2word[i] for i in top_k]))\n                    topics_output.append(top_k_words)\n                result[\"test-topics\"] = topics_output\n\n            result[\"test-topic-document-matrix\"] = (\n                self._get_topic_document_matrix())\n\n        else:\n            test_document_topic_matrix = []\n            for document in new_corpus:\n                document_topics_tuples = self.trained_model[document]\n                document_topics = np.zeros(\n                    self.hyperparameters[\"num_topics\"])\n                for single_tuple in document_topics_tuples:\n                    document_topics[single_tuple[0]] = single_tuple[1]\n\n                test_document_topic_matrix.append(document_topics)\n            result[\"test-topic-document-matrix\"] = np.array(\n                test_document_topic_matrix).transpose()\n    return result\n",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "Project function reference, gensim",
      "display": "LDA.py · train_model()",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "Project repository, gensim",
      "display": "MIND-Lab/OCTIS",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "Project stars, MIND-Lab/OCTIS",
      "display": "807",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "Project push date, MIND-Lab/OCTIS",
      "display": "Jun 2026",
      "asOf": "2026-06-21"
    },
    "F70": {
      "label": "Library name, stanza",
      "display": "Stanza",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Monthly downloads, stanza",
      "display": "765.6K",
      "asOf": "2026-11-12"
    },
    "F72": {
      "label": "License, stanza",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Package release, stanza",
      "display": "1.15.0, Oct 2026",
      "asOf": "2026-10-01"
    },
    "F74": {
      "label": "Package release date, stanza",
      "display": "Oct 2026",
      "asOf": "2026-10-01"
    },
    "F75": {
      "label": "Repository stars, stanza",
      "display": "7.9K",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Tokenization, stanza",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Part-of-speech tagging, stanza",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Named entities, stanza",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Output formats, stanza",
      "display": "CoNLL-U",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Install, stanza",
      "display": "pip install stanza",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "What it does, stanza",
      "display": "Chains neural language processors for structured text annotation.",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "strengths lead, stanza",
      "display": "Combines sentence and word analysis",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "strengths, stanza",
      "display": "Tokenize text, tag words, and run entity recognition through one pipeline.",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "strengths lead, stanza",
      "display": "Converts annotations to CoNLL-U",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "strengths, stanza",
      "display": "Convert annotated documents into the dependency-tree exchange format.",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "limitations lead, stanza",
      "display": "Models must be downloaded first",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "limitations, stanza",
      "display": "Provision each selected processor model before loading an offline pipeline.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Quickstart, stanza",
      "display": "import stanza\nnlp = stanza.Pipeline(lang=\"en\") # Initialize the default English pipeline\ndocuments = [\"This is a test document.\", \"I wrote another document for fun.\"] # Documents that we are going to process\nin_docs = [stanza.Document([], text=d) for d in documents] # Wrap each document with a stanza.Document object\nout_docs = nlp(in_docs) # Call the neural pipeline on this list of documents\nprint(out_docs[1]) # The output is also a list of stanza.Document objects, each output corresponding to an input Document object\n",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "Developer need",
      "display": "Production annotation pipelines",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "Why choose spacy",
      "display": "linguistic components",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "Developer need in introduction",
      "display": "production annotation pipelines",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "Developer need",
      "display": "Algorithms and corpus resources",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Why choose nltk",
      "display": "broad toolkit",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Developer need in introduction",
      "display": "algorithms and corpus resources",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Developer need",
      "display": "Semantic topic models",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Why choose gensim",
      "display": "unsupervised models",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Developer need in introduction",
      "display": "semantic topic models",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Developer need",
      "display": "Neural language annotation",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Why choose stanza",
      "display": "processor pipelines",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need in introduction",
      "display": "neural language annotation",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Page introduction",
      "display": "Python NLP libraries let text-processing developers analyze and process natural-language text.",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Library name, transformers",
      "display": "Transformers",
      "asOf": "2026-11-19"
    },
    "F103": {
      "label": "Monthly downloads, transformers",
      "display": "119.8M",
      "asOf": "2026-11-19"
    },
    "F104": {
      "label": "License, transformers",
      "display": "Apache 2.0 License",
      "asOf": "2026-11-19"
    },
    "F105": {
      "label": "Package release, transformers",
      "display": "5.23.0",
      "asOf": "2026-11-19"
    },
    "F106": {
      "label": "Package release date, transformers",
      "display": "Nov 2026",
      "asOf": "2026-11-19"
    },
    "F107": {
      "label": "Install, transformers",
      "display": "pip install torch transformers",
      "asOf": "2026-11-19"
    },
    "F108": {
      "label": "Quickstart, transformers",
      "display": "from transformers import pipeline\n\nclassifier = pipeline(model=\"distilbert/distilbert-base-uncased-finetuned-sst-2-english\")\nclassifier(\"This movie is disgustingly good !\")\n",
      "asOf": "2026-11-19"
    },
    "F109": {
      "label": "Official description, transformers",
      "display": "Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.",
      "asOf": "2026-11-19"
    },
    "F110": {
      "label": "Quickstart source file, transformers",
      "display": "src/transformers/pipelines/text_classification.py",
      "asOf": "2026-11-19"
    },
    "F111": {
      "label": "Repository stars, transformers",
      "display": "169.2K",
      "asOf": "2026-11-19"
    },
    "F112": {
      "label": "Text classifier training, transformers",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F113": {
      "label": "Linguistic token labels, transformers",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F114": {
      "label": "Primary model/analysis role, transformers",
      "display": "Pretrained Transformer model architectures,pipelines,and task-specific fine-tuning.",
      "asOf": "2026-11-19"
    },
    "F115": {
      "label": "First-call resources, transformers",
      "display": "[\"Existing Python environment satisfying the selected package requirements. First use downloads a real public SST-2 model and tokenizer unless already cached/provisioned. No model download or inference was executed. Uses the shorter official ungated text-classification starter rather than the gated Llama quicktour.\"]",
      "asOf": "2026-11-19"
    },
    "F116": {
      "label": "Project function, transformers",
      "display": "def run(self, text: str) -> dict[str, str]:\n    \"\"\"\n    Routes the text strings to different connections based on a category label.\n\n    :param text: A string of text to route.\n    :returns:\n        A dictionary with the label as key and the text as value.\n\n    :raises TypeError:\n        If the input is not a str.\n    :raises RuntimeError:\n        If the pipeline has not been loaded because warm_up() was not called before.\n    \"\"\"\n    if self.pipeline is None:\n        raise RuntimeError(\n            \"The component TransformersZeroShotTextRouter wasn't warmed up. Run 'warm_up()' before calling 'run()'.\"\n        )\n\n    if not isinstance(text, str):\n        raise TypeError(\"TransformersZeroShotTextRouter expects a str as input.\")\n\n    prediction = self.pipeline([text], candidate_labels=self.labels, multi_label=self.multi_label)\n    predicted_scores = prediction[0][\"scores\"]\n    max_score_index = max(range(len(predicted_scores)), key=predicted_scores.__getitem__)\n    label = prediction[0][\"labels\"][max_score_index]\n    return {label: text}\n",
      "asOf": "2026-11-19"
    },
    "F117": {
      "label": "Project source file, transformers",
      "display": "haystack/components/routers/zero_shot_text_router.py",
      "asOf": "2026-11-19"
    },
    "F118": {
      "label": "Project full_name, transformers",
      "display": "deepset-ai/haystack",
      "asOf": "2026-11-19"
    },
    "F119": {
      "label": "Project stargazers_count, transformers",
      "display": "27.0K",
      "asOf": "2026-11-19"
    },
    "F120": {
      "label": "Library name, nltk",
      "display": "NLTK",
      "asOf": "2026-11-19"
    },
    "F121": {
      "label": "Monthly downloads, nltk",
      "display": "48.3M",
      "asOf": "2026-11-19"
    },
    "F122": {
      "label": "License, nltk",
      "display": "Apache License, Version 2.0",
      "asOf": "2026-11-19"
    },
    "F123": {
      "label": "Package release, nltk",
      "display": "3.10.4",
      "asOf": "2026-11-19"
    },
    "F124": {
      "label": "Package release date, nltk",
      "display": "Oct 2026",
      "asOf": "2026-11-19"
    },
    "F125": {
      "label": "Install, nltk",
      "display": "pip install --user -U nltk",
      "asOf": "2026-11-19"
    },
    "F126": {
      "label": "Quickstart, nltk",
      "display": "import nltk\nsentence = \"\"\"At eight o'clock on Thursday morning\nArthur didn't feel very good.\"\"\"\ntokens = nltk.word_tokenize(sentence)\nprint(tokens)\n",
      "asOf": "2026-11-19"
    },
    "F127": {
      "label": "Repository stars, nltk",
      "display": "14.8K",
      "asOf": "2026-11-19"
    },
    "F128": {
      "label": "Text classifier training, nltk",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F129": {
      "label": "Linguistic token labels, nltk",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F130": {
      "label": "Primary model/analysis role, nltk",
      "display": "Classical linguistic processing,taggers,corpora,and feature-based classifiers.",
      "asOf": "2026-11-19"
    },
    "F131": {
      "label": "First-call resources, nltk",
      "display": "[\"Provision the current punkt_tab tokenizer resource through nltk.download(\\\"punkt_tab\\\") before running word_tokenize. This first-call prefix avoids adding POS/NER model requirements. The source interactive tokens expression is made explicit as print(tokens); setup is disclosed.\"]",
      "asOf": "2026-11-19"
    },
    "F132": {
      "label": "Project function, nltk",
      "display": "def _get_sentence_tokenizer(self, language):\n    if language in self.SPECIAL_SENTENCE_TOKENIZERS:\n        return self.SPECIAL_SENTENCE_TOKENIZERS[language]\n    try:\n        return nltk.tokenize.PunktTokenizer(language)\n    except (LookupError, zipfile.BadZipfile) as e:\n        raise LookupError(\n            \"NLTK tokenizers are missing or the language is not supported.\\n\"\n            \"\"\"Download them by following command: python -c \"import nltk; nltk.download('punkt_tab')\"\\n\"\"\"\n            \"Original error was:\\n\" + str(e)\n        )\n",
      "asOf": "2026-11-19"
    },
    "F133": {
      "label": "Project source file, nltk",
      "display": "sumy/nlp/tokenizers.py",
      "asOf": "2026-11-19"
    },
    "F134": {
      "label": "Project full_name, nltk",
      "display": "miso-belica/sumy",
      "asOf": "2026-11-19"
    },
    "F135": {
      "label": "Project stargazers_count, nltk",
      "display": "3.7K",
      "asOf": "2026-11-19"
    },
    "F136": {
      "label": "Library name, spacy",
      "display": "spaCy",
      "asOf": "2026-11-19"
    },
    "F137": {
      "label": "Monthly downloads, spacy",
      "display": "25.0M",
      "asOf": "2026-11-19"
    },
    "F138": {
      "label": "License, spacy",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F139": {
      "label": "Package release, spacy",
      "display": "3.8.18",
      "asOf": "2026-11-19"
    },
    "F140": {
      "label": "Package release date, spacy",
      "display": "Oct 2026",
      "asOf": "2026-11-19"
    },
    "F141": {
      "label": "Install, spacy",
      "display": "pip install spacy\npython -m spacy download en_core_web_sm",
      "asOf": "2026-11-19"
    },
    "F142": {
      "label": "Quickstart, spacy",
      "display": "import spacy\nnlp = spacy.load(\"en_core_web_sm\")\ndoc = nlp(\"This is a sentence.\")\nprint([(w.text, w.pos_) for w in doc])\n",
      "asOf": "2026-11-19"
    },
    "F143": {
      "label": "Repository stars, spacy",
      "display": "34.0K",
      "asOf": "2026-11-19"
    },
    "F144": {
      "label": "Text classifier training, spacy",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F145": {
      "label": "Linguistic token labels, spacy",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F146": {
      "label": "Primary model/analysis role, spacy",
      "display": "Configurable linguistic pipeline with separately trained components and model packages.",
      "asOf": "2026-11-19"
    },
    "F147": {
      "label": "First-call resources, spacy",
      "display": "[\"Python host. Provision the separately distributed English pipeline matching the installed spaCy major/minor compatibility; no model was downloaded here. Joins the source model-loading block and its one-call example.\"]",
      "asOf": "2026-11-19"
    },
    "F148": {
      "label": "Project function, spacy",
      "display": "def load(\n    model: Union[Literal[\"default\"], str, Language] = \"default\",\n    medspacy_enable: Union[Literal[\"all\", \"default\"], Iterable[str]] = \"default\",\n    medspacy_disable: Optional[Iterable[str]] = None,\n    language_code: str = \"en\",\n    load_rules: bool = True,\n    quickumls_path: Optional[str] = None,\n    **model_kwargs,\n):\n    \"\"\"Load a spaCy language object with medSpaCy pipeline components.\n    By default, the base model will be a blank 'en' model with the\n    following components:\n        - \"medspacy_tokenizer\": A customized, more aggressive tokenizer than the default spaCy tokenizer. This is set to\n            `nlp.tokenizer` and is not loaded as a pipeline component.\n        - \"medspacy_pyrush\": PyRuSH Sentencizer for sentence splitting\n        - \"medspacy_target_matcher\": TargetMatcher for extended pattern matching\n        - \"medspacy_context\": ConText for attribute assertion\n        - \"medspacy_quickumls\": QuickUMLS for UMLS concept mapping\n    Args:\n        model: The base spaCy model to load. If 'default', will instantiate from a blank 'en' model. If it is a spaCy\n            language model, then it will simply add medspaCy components to the existing pipeline. If it is a string\n            other than 'default', passes the string to spacy.load(model, **model_kwargs).\n        medspacy_enable: Specifies which components to enable in the medspacy pipeline. If \"default\", will load all components\n            found in `DEFAULT_PIPE_NAMES`. These represent the simplest components used in a clinical NLP pipeline:\n            tokenization, sentence detection, concept identification, and ConText. If \"all\", all components in medspaCy\n            will be loaded. If a collection of strings, the components specified will be loaded.\n        medspacy_disable: A collection of component names to exclude. Requires \"all\" is the value for `enable`.\n        language_code: Language code to use (ISO code) as a default for loading additional resources.  See documentation\n            and also the /resources directory to see which resources might be available in each language.\n            Default is \"en\" for English.\n        load_rules: Whether to include default rules for available components. If True, sectionizer and context will\n            both be loaded with default rules. Default is True.\n        quickumls_path: Path to QuickUMLS dictionaries if it is included in the pipeline.\n        model_kwargs: Optional model keyword arguments to pass to spacy.load().\n\n    Returns:\n        A spaCy Language object containing the specified medspacy components.\n    \"\"\"\n\n    medspacy_enable, medspacy_disable = _build_pipe_names(\n        medspacy_enable, medspacy_disable\n    )\n\n    if model == \"default\":\n        nlp = spacy.blank(\"en\")\n    elif isinstance(model, Language):\n        nlp = model\n    elif isinstance(model, str):\n        nlp = spacy.load(model, **model_kwargs)\n    else:\n        raise ValueError(\n            \"model must be either 'default' or an actual spaCy Language object, not \",\n            type(model),\n        )\n\n    if \"medspacy_tokenizer\" in medspacy_enable:\n        from .custom_tokenizer import create_medspacy_tokenizer\n\n        medspacy_tokenizer = create_medspacy_tokenizer(nlp)\n        nlp.tokenizer = medspacy_tokenizer\n\n    if \"medspacy_preprocessor\" in medspacy_enable:\n        from .preprocess import Preprocessor\n\n        preprocessor = Preprocessor(nlp.tokenizer)\n        nlp.tokenizer = preprocessor\n\n    if \"medspacy_pyrush\" in medspacy_enable:\n        pyrush_path = path.join(\n            Path(__file__).resolve().parents[1], \"resources\", language_code.lower(), \"rush_rules.tsv\"\n        )\n        nlp.add_pipe(\"medspacy_pyrush\", config={\"rules_path\": pyrush_path})\n\n    if \"medspacy_target_matcher\" in medspacy_enable:\n        nlp.add_pipe(\"medspacy_target_matcher\")\n\n    if \"medspacy_quickumls\" in medspacy_enable:\n        if quickumls_path is None:\n            quickumls_path = get_quickumls_demo_dir(language_code)\n\n            logger.info(\n                \"Loading QuickUMLS resources from a Medspacy-distributed SAMPLE of UMLS data from here: {}\".format(\n                    quickumls_path\n                )\n            )\n\n        nlp.add_pipe(\"medspacy_quickumls\", config={\"quickumls_fp\": quickumls_path})\n\n    if \"medspacy_context\" in medspacy_enable:\n        if load_rules is True:\n            config = {'language_code': language_code}\n        else:\n            config = {\"rules\": None,\n                      'language_code': language_code}\n        nlp.add_pipe(\"medspacy_context\", config=config)\n\n    if \"medspacy_sectionizer\" in medspacy_enable:\n        if load_rules is True:\n            config = {'language_code': language_code}\n        else:\n            config = {\"rules\": None,\n                      'language_code': language_code}\n        nlp.add_pipe(\"medspacy_sectionizer\", config=config)\n\n    if \"medspacy_postprocessor\" in medspacy_enable:\n        nlp.add_pipe(\"medspacy_postprocessor\")\n\n    if \"medspacy_doc_consumer\" in medspacy_enable:\n        nlp.add_pipe(\"medspacy_doc_consumer\")\n\n    return nlp\n",
      "asOf": "2026-11-19"
    },
    "F149": {
      "label": "Project source file, spacy",
      "display": "medspacy/util.py",
      "asOf": "2026-11-19"
    },
    "F150": {
      "label": "Project full_name, spacy",
      "display": "medspacy/medspacy",
      "asOf": "2026-11-19"
    },
    "F151": {
      "label": "Project stargazers_count, spacy",
      "display": "688",
      "asOf": "2026-11-19"
    },
    "F152": {
      "label": "Library name, sentence-transformers",
      "display": "Sentence Transformers",
      "asOf": "2026-11-19"
    },
    "F153": {
      "label": "Monthly downloads, sentence-transformers",
      "display": "22.6M",
      "asOf": "2026-11-19"
    },
    "F154": {
      "label": "License, sentence-transformers",
      "display": "Apache-2.0",
      "asOf": "2026-11-19"
    },
    "F155": {
      "label": "Package release, sentence-transformers",
      "display": "6.3.0",
      "asOf": "2026-11-19"
    },
    "F156": {
      "label": "Package release date, sentence-transformers",
      "display": "Nov 2026",
      "asOf": "2026-11-19"
    },
    "F157": {
      "label": "Install, sentence-transformers",
      "display": "pip install -U sentence-transformers",
      "asOf": "2026-11-19"
    },
    "F158": {
      "label": "Quickstart, sentence-transformers",
      "display": "from sentence_transformers import SentenceTransformer\r\n\r\n# 1. Load a pretrained Sentence Transformer model\r\nmodel = SentenceTransformer(\"sentence-transformers/all-MiniLM-L6-v2\")\r\n\r\n# The sentences to encode\r\nsentences = [\r\n    \"The weather is lovely today.\",\r\n    \"It's so sunny outside!\",\r\n    \"He drove to the stadium.\",\r\n]\r\n\r\n# 2. Calculate embeddings by calling model.encode()\r\nembeddings = model.encode(sentences)\n",
      "asOf": "2026-11-19"
    },
    "F159": {
      "label": "Official description, sentence-transformers",
      "display": "Embeddings, Retrieval, and Reranking",
      "asOf": "2026-11-19"
    },
    "F160": {
      "label": "Quickstart source file, sentence-transformers",
      "display": "docs/quickstart.rst",
      "asOf": "2026-11-19"
    },
    "F161": {
      "label": "Repository stars, sentence-transformers",
      "display": "19.3K",
      "asOf": "2026-11-19"
    },
    "F162": {
      "label": "Text classifier training, sentence-transformers",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F163": {
      "label": "Linguistic token labels, sentence-transformers",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F164": {
      "label": "Primary model/analysis role, sentence-transformers",
      "display": "Sentence embeddings,semantic retrieval,reranking,and paired-text classification.",
      "asOf": "2026-11-19"
    },
    "F165": {
      "label": "First-call resources, sentence-transformers",
      "display": "[\"Existing Python host and supported framework dependencies. The named public model is downloaded on first use unless provisioned/cached. This keeps the intact first-call prefix and omits the later similarity calculation and captured output.\"]",
      "asOf": "2026-11-19"
    },
    "F166": {
      "label": "Per-pair classification, sentence-transformers",
      "display": "CrossEncoder pair classifiers can have multiple labels; embedding/reranker outputs have different contracts.",
      "asOf": "2026-11-19"
    },
    "F167": {
      "label": "Project function, sentence-transformers",
      "display": "def __call__(self, input: Documents) -> Embeddings:\n    \"\"\"Generate embeddings for the given documents.\n\n    Args:\n        input: Documents to generate embeddings for.\n\n    Returns:\n        Embeddings for the documents.\n    \"\"\"\n    embeddings = self._model.encode(\n        list(input),\n        convert_to_numpy=True,\n        normalize_embeddings=self.normalize_embeddings,\n    )\n\n    return [np.array(embedding, dtype=np.float32) for embedding in embeddings]\n",
      "asOf": "2026-11-19"
    },
    "F168": {
      "label": "Project source file, sentence-transformers",
      "display": "chromadb/utils/embedding_functions/sentence_transformer_embedding_function.py",
      "asOf": "2026-11-19"
    },
    "F169": {
      "label": "Project full_name, sentence-transformers",
      "display": "chroma-core/chroma",
      "asOf": "2026-11-19"
    },
    "F170": {
      "label": "Project stargazers_count, sentence-transformers",
      "display": "29.7K",
      "asOf": "2026-11-19"
    },
    "F171": {
      "label": "Library name, jieba",
      "display": "Jieba",
      "asOf": "2026-11-19"
    },
    "F172": {
      "label": "Monthly downloads, jieba",
      "display": "6.2M",
      "asOf": "2026-11-19"
    },
    "F173": {
      "label": "License, jieba",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F174": {
      "label": "Package release, jieba",
      "display": "0.42.1",
      "asOf": "2026-11-19"
    },
    "F175": {
      "label": "Package release date, jieba",
      "display": "Jan 2020",
      "asOf": "2026-11-19"
    },
    "F176": {
      "label": "Install, jieba",
      "display": "pip install jieba",
      "asOf": "2026-11-19"
    },
    "F177": {
      "label": "Quickstart, jieba",
      "display": "import jieba\nseg_list = jieba.cut(\"我来到北京清华大学\", cut_all=False)\nprint(\"Default Mode: \" + \"/ \".join(seg_list))  # 精确模式\n",
      "asOf": "2026-11-19"
    },
    "F178": {
      "label": "Official description, jieba",
      "display": "Chinese Words Segmentation Utilities",
      "asOf": "2026-11-19"
    },
    "F179": {
      "label": "Quickstart source file, jieba",
      "display": "README.md",
      "asOf": "2026-11-19"
    },
    "F180": {
      "label": "Repository stars, jieba",
      "display": "35.2K",
      "asOf": "2026-11-19"
    },
    "F181": {
      "label": "Text classifier training, jieba",
      "display": "Undocumented",
      "asOf": "2026-11-19"
    },
    "F182": {
      "label": "Linguistic token labels, jieba",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F183": {
      "label": "Primary model/analysis role, jieba",
      "display": "Chinese segmentation,POS labels,and TF-IDF/TextRank keyword extraction.",
      "asOf": "2026-11-19"
    },
    "F184": {
      "label": "First-call resources, jieba",
      "display": "[\"Default dictionary/HMM mode; no Paddle dependency or external trained model is used. The import is joined with the unchanged documented default-mode statements; the earlier Paddle example is not included.\"]",
      "asOf": "2026-11-19"
    },
    "F185": {
      "label": "Language scope, jieba",
      "display": "Chinese-focused segmentation and POS; full/default/search modes differ.",
      "asOf": "2026-11-19"
    },
    "F186": {
      "label": "Project function, jieba",
      "display": "def cut(self, sentence, cut_all=False, use_hmm=True):\n    \"\"\"\n    The method used to cut the text to tokens.\n\n    Args:\n        sentence(str): The text that needs to be cut.\n        cut_all(bool, optional): Whether to use the full mode. If True,\n            using full mode that gets all the possible words from the\n            sentence, which is fast but not accurate. If False, using\n            accurate mode that attempts to cut the sentence into the most\n            accurate segmentations, which is suitable for text analysis.\n            Default: False.\n        use_hmm(bool, optional): Whether to use the HMM model. Default: True.\n\n    Returns:\n        list[str]: A list of tokens.\n\n    Example:\n        .. code-block:: python\n\n            from paddlenlp.data import Vocab, JiebaTokenizer\n            # The vocab file. The sample file can be downloaded firstly.\n            # wget https://bj.bcebos.com/paddlenlp/data/senta_word_dict.txt\n            vocab_file_path = './senta_word_dict.txt'\n            # Initialize the Vocab\n            vocab = Vocab.load_vocabulary(\n                vocab_file_path,\n                unk_token='[UNK]',\n                pad_token='[PAD]')\n            tokenizer = JiebaTokenizer(vocab)\n\n            tokens = tokenizer.cut('我爱你中国')\n            print(tokens)\n            # ['我爱你', '中国']\n    \"\"\"\n    return self.tokenizer.lcut(sentence, cut_all, use_hmm)",
      "asOf": "2026-11-19"
    },
    "F187": {
      "label": "Project source file, jieba",
      "display": "paddlenlp/data/tokenizer.py",
      "asOf": "2026-11-19"
    },
    "F188": {
      "label": "Project full_name, jieba",
      "display": "PaddlePaddle/PaddleNLP",
      "asOf": "2026-11-19"
    },
    "F189": {
      "label": "Project stargazers_count, jieba",
      "display": "13.0K",
      "asOf": "2026-11-19"
    },
    "F190": {
      "label": "Library name, textblob",
      "display": "TextBlob",
      "asOf": "2026-11-19"
    },
    "F191": {
      "label": "Monthly downloads, textblob",
      "display": "3.2M",
      "asOf": "2026-11-19"
    },
    "F192": {
      "label": "License, textblob",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F193": {
      "label": "Package release, textblob",
      "display": "0.20.1",
      "asOf": "2026-11-19"
    },
    "F194": {
      "label": "Package release date, textblob",
      "display": "Jul 2026",
      "asOf": "2026-11-19"
    },
    "F195": {
      "label": "Install, textblob",
      "display": "pip install -U textblob\npython -m textblob.download_corpora",
      "asOf": "2026-11-19"
    },
    "F196": {
      "label": "Quickstart, textblob",
      "display": "from textblob import TextBlob\ntestimonial = TextBlob(\"Textblob is amazingly simple to use. What great fun!\")\nprint(testimonial.sentiment)\n",
      "asOf": "2026-11-19"
    },
    "F197": {
      "label": "Official description, textblob",
      "display": "Simple, Pythonic text processing. Sentiment analysis, part-of-speech tagging, noun phrase parsing, and more.",
      "asOf": "2026-11-19"
    },
    "F198": {
      "label": "Quickstart source file, textblob",
      "display": "quickstart.html",
      "asOf": "2026-11-19"
    },
    "F199": {
      "label": "Repository stars, textblob",
      "display": "9.6K",
      "asOf": "2026-11-19"
    },
    "F200": {
      "label": "Text classifier training, textblob",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F201": {
      "label": "Linguistic token labels, textblob",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F202": {
      "label": "Primary model/analysis role, textblob",
      "display": "String-like text analysis facade for sentiment,POS,noun phrases,and text classifiers.",
      "asOf": "2026-11-19"
    },
    "F203": {
      "label": "First-call resources, textblob",
      "display": "[\"Existing Python host. Official install also provisions the NLTK corpora needed for the broader default toolkit; the first call shown reads sentiment. REPL import/setup/property fragments are explicitly assembled,not claimed as one upstream function.\"]",
      "asOf": "2026-11-19"
    },
    "F204": {
      "label": "Project function, textblob",
      "display": "def get_tweet_sentiment(self, tweet):\n    '''\n    Utility function to classify sentiment of passed tweet\n    using textblob's sentiment method\n    '''\n    # create TextBlob object of passed tweet text\n    analysis = TextBlob(self.clean_tweet(tweet))\n    # set sentiment\n    if analysis.sentiment.polarity > 0:\n        return 'positive'\n    elif analysis.sentiment.polarity == 0:\n        return 'neutral'\n    else:\n        return 'negative'\n",
      "asOf": "2026-11-19"
    },
    "F205": {
      "label": "Project source file, textblob",
      "display": "Crypto-Trading-Bots/Crypto_Sentiment_Analysis_SocialMedia_Bot.py",
      "asOf": "2026-11-19"
    },
    "F206": {
      "label": "Project full_name, textblob",
      "display": "Roibal/Cryptocurrency-Trading-Bots-Python-Beginner-Advance",
      "asOf": "2026-11-19"
    },
    "F207": {
      "label": "Project stargazers_count, textblob",
      "display": "1.4K",
      "asOf": "2026-11-19"
    },
    "F208": {
      "label": "Library name, gensim",
      "display": "Gensim",
      "asOf": "2026-11-19"
    },
    "F209": {
      "label": "Monthly downloads, gensim",
      "display": "3.0M",
      "asOf": "2026-11-19"
    },
    "F210": {
      "label": "License, gensim",
      "display": "LGPL-2.1-only",
      "asOf": "2026-11-19"
    },
    "F211": {
      "label": "Package release, gensim",
      "display": "4.4.0",
      "asOf": "2026-11-19"
    },
    "F212": {
      "label": "Package release date, gensim",
      "display": "Oct 2025",
      "asOf": "2026-11-19"
    },
    "F213": {
      "label": "Install, gensim",
      "display": "pip install --upgrade gensim",
      "asOf": "2026-11-19"
    },
    "F214": {
      "label": "Quickstart, gensim",
      "display": "import gensim.downloader as api\nmodel = api.load(\"glove-wiki-gigaword-50\")\nmodel.most_similar(\"glass\")\n",
      "asOf": "2026-11-19"
    },
    "F215": {
      "label": "Repository stars, gensim",
      "display": "16.5K",
      "asOf": "2026-11-19"
    },
    "F216": {
      "label": "Text classifier training, gensim",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F217": {
      "label": "Linguistic token labels, gensim",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F218": {
      "label": "Primary model/analysis role, gensim",
      "display": "Unsupervised document/topic/word vector models and streaming corpora.",
      "asOf": "2026-11-19"
    },
    "F219": {
      "label": "First-call resources, gensim",
      "display": "[\"Python host. First use downloads the separately licensed GloVe vectors from the real Gensim-data resource; network/storage needed unless cached. Joins the documented import and shortest pretrained-model lookup block,without source benchmark outputs.\"]",
      "asOf": "2026-11-19"
    },
    "F220": {
      "label": "Topic-model evaluation branch, gensim",
      "display": "The retained OCTIS example optionally updates the model with test documents.",
      "asOf": "2026-11-19"
    },
    "F221": {
      "label": "Project function, gensim",
      "display": "def train_model(self, dataset, hyperparams=None, top_words=10):\n    \"\"\"\n    Train the model and return output\n\n    Parameters\n    ----------\n    dataset : dataset to use to build the model\n    hyperparams : hyperparameters to build the model\n    top_words : if greater than 0 returns the most significant words for\n                each topic in the output (Default True)\n    Returns\n    -------\n    result : dictionary with up to 3 entries,\n             'topics', 'topic-word-matrix' and\n             'topic-document-matrix'\n    \"\"\"\n    if hyperparams is None:\n        hyperparams = {}\n\n    if self.use_partitions:\n        train_corpus, test_corpus = dataset.get_partitioned_corpus(\n            use_validation=False)\n    else:\n        train_corpus = dataset.get_corpus()\n\n    if self.id2word is None:\n        self.id2word = corpora.Dictionary(dataset.get_corpus())\n\n    if self.id_corpus is None:\n        self.id_corpus = [self.id2word.doc2bow(document)\n                          for document in train_corpus]\n\n    if \"num_topics\" not in hyperparams:\n        hyperparams[\"num_topics\"] = self.hyperparameters[\"num_topics\"]\n\n    # Allow alpha to be a float in case of symmetric alpha\n    if \"alpha\" in hyperparams:\n        if isinstance(hyperparams[\"alpha\"], float):\n            hyperparams[\"alpha\"] = [\n                hyperparams[\"alpha\"]\n            ] * hyperparams[\"num_topics\"]\n\n    hyperparams[\"corpus\"] = self.id_corpus\n    hyperparams[\"id2word\"] = self.id2word\n    self.hyperparameters.update(hyperparams)\n\n    self.trained_model = ldamodel.LdaModel(**self.hyperparameters)\n\n    result = {}\n\n    result[\"topic-word-matrix\"] = self.trained_model.get_topics()\n\n    if top_words > 0:\n        topics_output = []\n        for topic in result[\"topic-word-matrix\"]:\n            top_k = np.argsort(topic)[-top_words:]\n            top_k_words = list(reversed([self.id2word[i] for i in top_k]))\n            topics_output.append(top_k_words)\n        result[\"topics\"] = topics_output\n\n    result[\"topic-document-matrix\"] = self._get_topic_document_matrix()\n\n    if self.use_partitions:\n        new_corpus = [self.id2word.doc2bow(\n            document) for document in test_corpus]\n        if self.update_with_test:\n            self.trained_model.update(new_corpus)\n            self.id_corpus.extend(new_corpus)\n\n            result[\"test-topic-word-matrix\"] = (\n                self.trained_model.get_topics())\n\n            if top_words > 0:\n                topics_output = []\n                for topic in result[\"test-topic-word-matrix\"]:\n                    top_k = np.argsort(topic)[-top_words:]\n                    top_k_words = list(\n                        reversed([self.id2word[i] for i in top_k]))\n                    topics_output.append(top_k_words)\n                result[\"test-topics\"] = topics_output\n\n            result[\"test-topic-document-matrix\"] = (\n                self._get_topic_document_matrix())\n\n        else:\n            test_document_topic_matrix = []\n            for document in new_corpus:\n                document_topics_tuples = self.trained_model[document]\n                document_topics = np.zeros(\n                    self.hyperparameters[\"num_topics\"])\n                for single_tuple in document_topics_tuples:\n                    document_topics[single_tuple[0]] = single_tuple[1]\n\n                test_document_topic_matrix.append(document_topics)\n            result[\"test-topic-document-matrix\"] = np.array(\n                test_document_topic_matrix).transpose()\n    return result\n",
      "asOf": "2026-11-19"
    },
    "F222": {
      "label": "Project source file, gensim",
      "display": "octis/models/LDA.py",
      "asOf": "2026-11-19"
    },
    "F223": {
      "label": "Project full_name, gensim",
      "display": "MIND-Lab/OCTIS",
      "asOf": "2026-11-19"
    },
    "F224": {
      "label": "Project stargazers_count, gensim",
      "display": "807",
      "asOf": "2026-11-19"
    },
    "F225": {
      "label": "Library name, fasttext",
      "display": "fastText",
      "asOf": "2026-11-19"
    },
    "F226": {
      "label": "Monthly downloads, fasttext",
      "display": "2.2M",
      "asOf": "2026-11-19"
    },
    "F227": {
      "label": "License, fasttext",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F228": {
      "label": "Package release, fasttext",
      "display": "0.9.3",
      "asOf": "2026-11-19"
    },
    "F229": {
      "label": "Package release date, fasttext",
      "display": "Jun 2024",
      "asOf": "2026-11-19"
    },
    "F230": {
      "label": "Install, fasttext",
      "display": "pip install fasttext",
      "asOf": "2026-11-19"
    },
    "F231": {
      "label": "Quickstart, fasttext",
      "display": "import fasttext\nmodel = fasttext.train_supervised('data.train.txt')\n",
      "asOf": "2026-11-19"
    },
    "F232": {
      "label": "Official description, fasttext",
      "display": "fasttext Python bindings",
      "asOf": "2026-11-19"
    },
    "F233": {
      "label": "Quickstart source file, fasttext",
      "display": "python-module.html",
      "asOf": "2026-11-19"
    },
    "F234": {
      "label": "Repository stars, fasttext",
      "display": "26.5K",
      "asOf": "2026-11-19"
    },
    "F235": {
      "label": "Text classifier training, fasttext",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F236": {
      "label": "Linguistic token labels, fasttext",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F237": {
      "label": "Primary model/analysis role, fasttext",
      "display": "Supervised text classification and word/subword representations.",
      "asOf": "2026-11-19"
    },
    "F238": {
      "label": "First-call resources, fasttext",
      "display": "[\"Provide an actual UTF-8 data.train.txt with lines containing __label__ prefixed labels and tokenized text. Source builds require the documented C++ toolchain and compatible Python build environment. This is the official shortest supervised first call; no input file was invented or training executed.\"]",
      "asOf": "2026-11-19"
    },
    "F239": {
      "label": "Project function, fasttext",
      "display": "def main():\n    args = get_args()\n    random.seed(args.seed)\n    train_input = args.input\n\n    train_was_split = False\n    if args.valid_input:\n        valid_input = args.valid_input\n    elif args.valid_frac > 0:\n        train_input, valid_input = split_train_val(train_input, args.valid_frac)\n        train_was_split = True\n    else:\n        valid_input = None\n\n    hyperparams = {'lr': args.lr, 'dim': args.dim, 'ws': args.ws, 'epoch': args.epoch, 'minCount': args.minCount, 'wordNgrams': args.wordNgrams}\n    model = fasttext.train_supervised(input=train_input, **hyperparams)\n\n    print(\"Training results\")\n    print_results(*model.test(train_input))\n\n    if valid_input is not None:\n        print(\"Validation results\")\n        print_results(*model.test(valid_input))\n\n    # Save the model\n    output = args.name if args.name.endswith(\".bin\") else args.name + \".bin\"\n    model.save_model(os.path.join(args.output_dir, output))\n\n    if train_was_split:\n        os.remove(train_input)\n        os.remove(valid_input)\n",
      "asOf": "2026-11-19"
    },
    "F240": {
      "label": "Project source file, fasttext",
      "display": "baselines/train_fasttext_classifier.py",
      "asOf": "2026-11-19"
    },
    "F241": {
      "label": "Project full_name, fasttext",
      "display": "mlfoundations/dclm",
      "asOf": "2026-11-19"
    },
    "F242": {
      "label": "Project stargazers_count, fasttext",
      "display": "1.5K",
      "asOf": "2026-11-19"
    },
    "F243": {
      "label": "Developer need",
      "display": "Production annotation pipelines",
      "asOf": "2026-11-17"
    },
    "F244": {
      "label": "Pick reason",
      "display": "trained tagging and entity pipelines",
      "asOf": "2026-11-17"
    },
    "F245": {
      "label": "Pick alternative reason",
      "display": "if separate algorithms are needed",
      "asOf": "2026-11-17"
    },
    "F246": {
      "label": "Developer need",
      "display": "Research and teaching",
      "asOf": "2026-11-17"
    },
    "F247": {
      "label": "Pick reason",
      "display": "algorithms with corpora",
      "asOf": "2026-11-17"
    },
    "F248": {
      "label": "Pick alternative reason",
      "display": "if one trained pipeline is enough",
      "asOf": "2026-11-17"
    },
    "F249": {
      "label": "Developer need",
      "display": "Embeddings and semantic search",
      "asOf": "2026-11-17"
    },
    "F250": {
      "label": "Pick reason",
      "display": "pretrained embedding models",
      "asOf": "2026-11-17"
    },
    "F251": {
      "label": "Pick alternative reason",
      "display": "if vectors are trained locally",
      "asOf": "2026-11-17"
    },
    "F252": {
      "label": "Developer need",
      "display": "Pretrained models for text tasks",
      "asOf": "2026-11-17"
    },
    "F253": {
      "label": "Pick reason",
      "display": "pipelines over Hub models",
      "asOf": "2026-11-17"
    },
    "F254": {
      "label": "Pick alternative reason",
      "display": "if the output is embeddings",
      "asOf": "2026-11-17"
    },
    "F255": {
      "label": "Developer need",
      "display": "Topic models over large corpora",
      "asOf": "2026-11-17"
    },
    "F256": {
      "label": "Pick reason",
      "display": "streamed topic models",
      "asOf": "2026-11-17"
    },
    "F257": {
      "label": "Pick alternative reason",
      "display": "if supervised classification is the goal",
      "asOf": "2026-11-17"
    },
    "F258": {
      "label": "Developer need",
      "display": "Fast text classification",
      "asOf": "2026-11-17"
    },
    "F259": {
      "label": "Pick reason",
      "display": "supervised classifiers on text files",
      "asOf": "2026-11-17"
    },
    "F260": {
      "label": "Pick alternative reason",
      "display": "if a pretrained model is wanted",
      "asOf": "2026-11-17"
    },
    "F261": {
      "label": "Developer need",
      "display": "Quick sentiment and tags",
      "asOf": "2026-11-17"
    },
    "F262": {
      "label": "Pick reason",
      "display": "one object for common tasks",
      "asOf": "2026-11-17"
    },
    "F263": {
      "label": "Pick alternative reason",
      "display": "if accuracy needs trained pipelines",
      "asOf": "2026-11-17"
    },
    "F264": {
      "label": "Developer need",
      "display": "Chinese word segmentation",
      "asOf": "2026-11-17"
    },
    "F265": {
      "label": "Pick reason",
      "display": "segmentation modes and dictionaries",
      "asOf": "2026-11-17"
    },
    "F266": {
      "label": "Pick alternative reason",
      "display": "if other languages are involved",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-19",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Python NLP libraries spaCy NLTK Gensim Stanza tokenization POS named entities topic modeling code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
