Universe

Numeric Fused-Head

Numeric Fused-Head Identificaiton and Resolution in English

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.

Example

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[16]._.is_nfh == True assert doc[18]._.is_nfh == False assert doc[3]._.is_deter_nfh == True assert doc[16]._.is_deter_nfh == False assert len(doc._.nfh) == 4
Author info

Yanai Elazar

GitHubyanaiela/num_fh

Categories pipeline research

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.

Read the docsJSON source