Search code examples
pythonnlpspacy

Difference in Tense when using Spacy POS on the same sentence on different PCs


I was taking a course on Udemy about NLP. So I reached the POS section. So when the instructor was demonstrating the POS tag attribute, I was having a difference in tense on the same sentence which we both were entering.

So I was using the sentence "I read books on SpaCy.". He was also using the same sentence but when we applied token.tag_ I got VBD where as he got VBP. Can anyone explain why it happened?


Solution

  • In general the models should be deterministic. It's possible that we missed something and that's not quite the case, but first you should check these things:

    • are you using the same version of spaCy?
    • are the models the same version? (small differences here would explain this)
    • is the input string actually the same, or is it different? ("SpaCy" vs "spaCy" for example)
    • is your code the same?

    If everything is actually the same, what model are you using?