Library Documentation

nerd.ner.download_model(model_name)

Downloads and links language trained model.

>>> from nerd import ner
>>> ner.download_model(model_name='en_core_web_sm')
>>> supported languages 'en_core_web_sm', 'de_core_news_sm', 'fr_core_news_sm',
>>> 'es_core_news_sm', 'pt_core_news_sm', 'it_core_news_sm',
>>> 'nl_core_news_sm', 'el_core_news_sm', 'xx_ent_wiki_sm'
Parameters:model_name (str) – Model package name.
nerd.ner.load_model(language='en_core_web_sm')

Loads language trained model.

>>> from nerd import ner
>>> ner.load_model(language='en_core_web_sm')
>>> or
>>> ner.load_model(language='de_core_news_sm')
>>> supported languages 'en_core_web_sm', 'de_core_news_sm', 'fr_core_news_sm',
>>> 'es_core_news_sm', 'pt_core_news_sm', 'it_core_news_sm',
>>> 'nl_core_news_sm', 'el_core_news_sm', 'xx_ent_wiki_sm'
Parameters:language (str) – Language package name, shortcut link or model path.
Return type:Language class with the loaded model.
nerd.ner.name(text, language='en_core_web_sm')

Find related name entities from given text.

>>> from nerd import ner
>>> ner.name('another text given as parameter for name entity recognition', language='en_core_web_sm')
Parameters:
  • text (str) – Group of words or sentences.
  • language (str) – Language package name, shortcut link or model path.
Return type:

Entities found from given text.