import spacy from spacy_kenlm import spaCyKenLM nlp = spacy.load('en_core_web_sm') spacy_kenlm = spaCyKenLM() # default model from test.arpa nlp.add_pipe(spacy_kenlm) doc = nlp('How are you?') doc._.kenlm_score # doc score doc[:2]._.kenlm_score # span score doc._.kenlm_score # token score
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.