spacymoji
spacymoji copied to clipboard
💙 Emoji handling and meta data for spaCy with custom extension attributes
The Emoji library seems to base the metadata on Unicode's database, however it may not be descriptive enough for some. - https://www.wikiwand.com/en/Dingbat#/Dingbats_Unicode_block - Ticks - Crosses - Enclosed Text -...
``` import spacy from spacymoji import Emoji def test(): nlp = spacy.load('en_core_web_sm') emoji = Emoji(nlp, merge_spans=True) nlp.add_pipe(emoji, first=True) doc = nlp( 'Word!👍🏿') for token in doc: print (token) doc =...
When calling: token._.is_hashtag I get this error : [E047] Can't assign a value to unregistered extension attribute 'is_hashtag'. Did you forget to call the `set_extension` method I use spaCy v2.1.6
This is probably a rare case occurring only when adding a spacymoji step to the pipeline of a StanfordNLPLanguage instance. However, what happens is that the spacymoji constructor uses the...