0
$\begingroup$

When I do wnl.lemmatize('promotional','a') or wnl.lemmatize('promotional',wordnet.ADJ), I get merely 'promotional' when it should return promotion. I supplied the correct POS, so why isn't it working? What can I do?

$\endgroup$
1
$\begingroup$

"promotional" is not an inflected form of "promotion", therefore "promotion" is not the lemma of "promotional". Actually, "promotion" is a noun and "promotional" is an adjective.

Maybe what you actually want to do is not lemmatisation but stemming. Note that the stem is the root of the word and, certainly, the stem of both "promotion" and "promotional" can be "promot" (or "promotion", depending on the convention).

$\endgroup$
5
  • $\begingroup$ I tried stemming, but it would cause me further issues. For example, I won't be able to differentiate "bare" with "bar" if I stem all my words. $\endgroup$
    – sangstar
    Jul 15 at 16:02
  • $\begingroup$ I understand, but lemmatization will not give you the same lemma for different words like "promotion" and "promotional". This kind of mismatch is usual in NLP projects. Sometimes they are ignored, sometimes they are addressed with some of hand-written rules for the diverging cases, if they are not many. Another option is to train your own lemmatizer or stemmer with data that fits your needs. $\endgroup$
    – noe
    Jul 15 at 16:20
  • $\begingroup$ I see - so there is no one-size-fits-all solution to this problem. $\endgroup$
    – sangstar
    Jul 15 at 16:26
  • $\begingroup$ No, I don't think so. $\endgroup$
    – noe
    Jul 15 at 16:28
  • $\begingroup$ If the answer was helpful, please consider upvoting it and marking it as correct. $\endgroup$
    – noe
    Jul 15 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.