What is the difference between lemmatization vs stemming?

后端 未结 9 1975
无人共我
无人共我 2020-12-07 08:25

When do I use each ?

Also...is the NLTK lemmatization dependent upon Parts of Speech? Wouldn\'t it be more accurate if it was?

相关标签:
9条回答
  • 2020-12-07 08:42

    As MYYN pointed out, stemming is the process of removing inflectional and sometimes derivational affixes to a base form that all of the original words are probably related to. Lemmatization is concerned with obtaining the single word that allows you to group together a bunch of inflected forms. This is harder than stemming because it requires taking the context into account (and thus the meaning of the word), while stemming ignores context.

    As for when you would use one or the other, it's a matter of how much your application depends on getting the meaning of a word in context correct. If you're doing machine translation, you probably want lemmatization to avoid mistranslating a word. If you're doing information retrieval over a billion documents with 99% of your queries ranging from 1-3 words, you can settle for stemming.

    As for NLTK, the WordNetLemmatizer does use the part of speech, though you have to provide it (otherwise it defaults to nouns). Passing it "dove" and "v" yields "dive" while "dove" and "n" yields "dove".

    0 讨论(0)
  • 2020-12-07 08:42

    Stemming just removes or stems the last few characters of a word, often leading to incorrect meanings and spelling. Lemmatization considers the context and converts the word to its meaningful base form, which is called Lemma. Sometimes, the same word can have multiple different Lemmas. We should identify the Part of Speech (POS) tag for the word in that specific context. Here are the examples to illustrate all the differences and use cases:

    1. If you lemmatize the word 'Caring', it would return 'Care'. If you stem, it would return 'Car' and this is erroneous.
    2. If you lemmatize the word 'Stripes' in verb context, it would return 'Strip'. If you lemmatize it in noun context, it would return 'Stripe'. If you just stem it, it would just return 'Strip'.
    3. You would get same results whether you lemmatize or stem words such as walking, running, swimming... to walk, run, swim etc.
    4. Lemmatization is computationally expensive since it involves look-up tables and what not. If you have large dataset and performance is an issue, go with Stemming. Remember you can also add your own rules to Stemming. If accuracy is paramount and dataset isn't humongous, go with Lemmatization.
    0 讨论(0)
  • 2020-12-07 08:47

    The purpose of both stemming and lemmatization is to reduce morphological variation. This is in contrast to the the more general "term conflation" procedures, which may also address lexico-semantic, syntactic, or orthographic variations.

    The real difference between stemming and lemmatization is threefold:

    1. Stemming reduces word-forms to (pseudo)stems, whereas lemmatization reduces the word-forms to linguistically valid lemmas. This difference is apparent in languages with more complex morphology, but may be irrelevant for many IR applications;

    2. Lemmatization deals only with inflectional variance, whereas stemming may also deal with derivational variance;

    3. In terms of implementation, lemmatization is usually more sophisticated (especially for morphologically complex languages) and usually requires some sort of lexica. Satisfatory stemming, on the other hand, can be achieved with rather simple rule-based approaches.

    Lemmatization may also be backed up by a part-of-speech tagger in order to disambiguate homonyms.

    0 讨论(0)
  • 2020-12-07 08:50

    There are two aspects to show their differences:

    1. A stemmer will return the stem of a word, which needn't be identical to the morphological root of the word. It usually sufficient that related words map to the same stem,even if the stem is not in itself a valid root, while in lemmatisation, it will return the dictionary form of a word, which must be a valid word.

    2. In lemmatisation, the part of speech of a word should be first determined and the normalisation rules will be different for different part of speech, while the stemmer operates on a single word without knowledge of the context, and therefore cannot discriminate between words which have different meanings depending on part of speech.

    Reference http://textminingonline.com/dive-into-nltk-part-iv-stemming-and-lemmatization

    0 讨论(0)
  • 2020-12-07 08:50

    ianacl
    but i think Stemming is a rough hack people use to get all the different forms of the same word down to a base form which need not be a legit word on its own
    Something like the Porter Stemmer can uses simple regexes to eliminate common word suffixes

    Lemmatization brings a word down to its actual base form which, in the case of irregular verbs, might look nothing like the input word
    Something like Morpha which uses FSTs to bring nouns and verbs to their base form

    0 讨论(0)
  • 2020-12-07 08:54

    Stemming is the process of removing the last few characters of a given word, to obtain a shorter form, even if that form doesn't have any meaning.

    Examples,

    "beautiful" -> "beauti"
    "corpora" -> "corpora"
    

    Stemming can be done very quickly.

    Lemmatization on the other hand, is the process of converting the given word into it's base form according to the dictionary meaning of the word.

    Examples,

    "beautiful" -> "beauty"
    "corpora" -> "corpus"
    

    Lemmatization takes more time than stemming.

    0 讨论(0)
提交回复
热议问题