lexnlp.extract.en.entities.tests package

Submodules

lexnlp.extract.en.entities.tests.test_get_companies module

class lexnlp.extract.en.entities.tests.test_get_companies.TestGetCompanies(methodName='runTest')

Bases: unittest.case.TestCase

test_reg_back()
test_with_apostrophe()
test_with_colon()
test_with_wo_apostrophe()

lexnlp.extract.en.entities.tests.test_nltk_maxent module

Unit tests for the NLTK maximum entropy entity extraction methods.

This module implements unit tests for the named entity extraction functionality in English based on the NLTK POS-tagging and (fuzzy) chunking methods.

Todo:
  • Better testing for exact test in return sources

  • More pathological and difficult cases

lexnlp.extract.en.entities.tests.test_nltk_maxent.empty_string_converter(data: List[Any])
lexnlp.extract.en.entities.tests.test_nltk_maxent.test_companies()

Test get_companies methods. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_companies_and()

Test get_companies methods with CC case. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_companies_count()

Test get_companies with counting uniques. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_companies_rs()

Test get_companies methods with return_source. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_company_abbr_name()

Test get_companies methods with detailed type option. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_company_detail_type()

Test get_companies methods with detailed type option. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_company_has_type_only()

Test get_companies methods with company without name. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_company_upper_name()

Test get_companies methods with name_upper arg. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_gpe_in()

Test whether large list of GPE examples match. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_gpes()

Test get_geopolitical methods. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_gpes_rs()

Test get_geopolitical methods with return_source :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_noun_phrases()

Test get_noun_phrases methods. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_person_in()

Test whether large list of person examples match. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_persons()

Test get_persons methods. :return:

lexnlp.extract.en.entities.tests.test_nltk_maxent.test_persons_rs()

Test get_persons methods with return_source. :return:

lexnlp.extract.en.entities.tests.test_nltk_re module

Unit tests for the NLTK regular expression entity extraction methods.

This module implements unit tests for the named entity extraction functionality in English based on the NLTK POS-tagging and (fuzzy) chunking methods.

Todo:
  • Better testing for exact test in return sources

  • More pathological and difficult cases

lexnlp.extract.en.entities.tests.test_nltk_re.company_annotation_to_tuple_converter(ants: List[lexnlp.extract.common.annotations.company_annotation.CompanyAnnotation], need_detail: bool)
lexnlp.extract.en.entities.tests.test_nltk_re.company_annotation_to_tuple_converter_detailed(ants: List[lexnlp.extract.common.annotations.company_annotation.CompanyAnnotation])
lexnlp.extract.en.entities.tests.test_nltk_re.company_annotation_to_tuple_converter_short(ants: List[lexnlp.extract.common.annotations.company_annotation.CompanyAnnotation])
lexnlp.extract.en.entities.tests.test_nltk_re.test_company_article_regex()

Test company regular expressions. :return:

lexnlp.extract.en.entities.tests.test_nltk_re.test_company_as()

Text company as … strings. :return:

lexnlp.extract.en.entities.tests.test_nltk_re.test_company_regex()

Test company regular expressions. :return:

lexnlp.extract.en.entities.tests.test_stanford_ner module

Name unit tests for English.

This module implements unit tests for the name extraction functionality in English.

Todo:
  • Better testing for exact test in return sources

  • More pathological and difficult cases

lexnlp.extract.en.entities.tests.test_stanford_ner.test_stanford_locations()

Test Stanford NER location extraction. :return:

lexnlp.extract.en.entities.tests.test_stanford_ner.test_stanford_name_example_in()
lexnlp.extract.en.entities.tests.test_stanford_ner.test_stanford_org_example_in()

Module contents