Skip to content
TigreGoticoPublic

Latest commit

 

History

47 Commits

Folders and files

Repository files navigation

Pronomial

Pronomial is a fast, rule-based coreference solver. It links each pronoun in a text to the noun it most likely refers to, using part-of-speech tags, a word gender classifier, and lists of pronouns. It supports English, Portuguese, Spanish, and Catalan.

Install

pip install pronomial

Usage

from pronomial import replace_corefs

replace_corefs("London has been a major settlement for two millennia. "
               "It was founded by the Romans, who named it Londinium.", 
               lang="en")
"""
"London has been a major settlement for two millennia . "
"London was founded by the Romans , Romans named London Londinium ."
"""

See docs/quickstart.md for more examples, and docs/api.md for the full function and class reference.

About

Pronomial works well on short sentences. It is safe to use for simple text, but it can fail on complex sentences with several competing antecedents.

For a full coreference resolution library, see neuralcoref or coreferee.

Pronomial is a baseline. It shows how well simple heuristics can solve coreference resolution. Do not rely on it for production use.

Related projects

License

Apache License 2.0. See LICENSE.

Releases

Packages

Used by

Contributors

Languages