Open mauuuuu5 opened 1 year ago
Hi in case you want to upload the emoji drill here is the code
import spacy from spacy.matcher import Matcher from spacymoji import Emoji nlp = spacy.load("en_core_web_md") pos_emoji = ["😀", "😃", "😂", "😊", "😊", "😍"] neg_emoji = ["😞", "😠", "😩", "😢", "😭", "😒"] pos_patterns = [[{"ORTH": emoji}] for emoji in pos_emoji] neg_patterns = [[{"ORTH": emoji}] for emoji in neg_emoji] matcher = Matcher(nlp.vocab) matcher.add("posEmoji", pos_patterns) matcher.add("negEmoji", neg_patterns) doc = nlp(" I love Zara 😍") for mid, start, end in matcher(doc): print(start, end, doc[start:end])
Cheers
Hi in case you want to upload the emoji drill here is the code
Cheers