This package provide a wrapper for the Numeric Fused-Head in English. It provides another information layer on numbers that refer to another entity which is not obvious from the syntactic tree.
import spacy from num_fh import NFH nlp = spacy.load('en_core_web_sm') nfh = NFH(nlp) nlp.add_pipe(nfh, first=False) doc = nlp("I told you two, that only one of them is the one who will get 2 or 3 icecreams") assert doc._.is_nfh == True assert doc._.is_nfh == False assert doc._.is_deter_nfh == True assert doc._.is_deter_nfh == False assert len(doc._.nfh) == 4
Submit your project
If you have a project that you want the spaCy community to make use of, you can suggest it by submitting a pull request to the spaCy website repository. The Universe database is open-source and collected in a simple JSON file. For more details on the formats and available fields, see the documentation. Looking for inspiration your own spaCy plugin or extension? Check out the
project idea label on the issue tracker.