I am using spacy to lemmatize some text and it lemmatizes the words robotic to robotic instead of robot. Could someone help me with this?
Here is the code:
import spacy
nlp = spacy.load('en')
sentence = "Industry 5.0 aims at establishing an inclusive, smart and sustainable production process that encourages human creativity and expertise by leveraging enhanced automation and machine intelligence. Collaborative robotics, is a major enabling technology of Industry 5.0, which aspires at improving human dexterity by elevating robots to extensions of human capabilities and, ultimately, even as team members."
# Parse the sentence using the loaded 'en' model object `nlp`
doc = nlp(sentence)
print("Original sentence: " + sentence)
# Extract the lemma for each token and join
lemma = " ".join([token.lemma_ for token in doc])
print("Lemma sentence: " + lemma)
I already tried using several other models such as the en_core_web_lg etc… but I still have the same results
New contributor
Mnnth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1