Logo
0.2.7
  • About LexNLP
  • LexNLP package
  • Changelog
  • License
LexNLP
  • Docs »
  • lexnlp.extract.en.copyright: Extracting copyright references
  • View page source

lexnlp.extract.en.copyright: Extracting copyright references¶

The lexnlp.extract.en.copyright module contains methods that allow for the extraction of copyright references from text.

The full list of current unit test cases can be found here: https://github.com/LexPredict/lexpredict-lexnlp/tree/master/test_data/lexnlp/extract/en/tests/test_copyright

Extracting copyrights¶

lexnlp.extract.en.copyright.get_copyright(text: str, return_sources=False) → Generator¶

Example

>>> import lexnlp.extract.en.copyright
>>> text = "(C) Copyright 1993-1996 Hughes Information Systems Company"
>>> print(list(lexnlp.extract.en.copyright.get_copyright(text)))
[('Copyright', '1993-1996', 'Hughes Information Systems Company')]

>>> text = "Test copyrigh symbol © 2017, SIGN LLC"
>>> print(list(lexnlp.extract.en.conditions.get_conditions(text)))
print(list(lexnlp.extract.en.copyright.get_copyright(text)))
[('©', '2017', 'SIGN LLC')]

© Copyright 2017-2019, ContraxSuite, LLC

Built with Sphinx using a theme provided by Read the Docs.