4

I'm looking for a possibly simple solution of the following problem:

Given input of a sentence like

"Absence makes the heart grow fonder."

Produce a list of basic words followed by their difficulty/complexity

[["absence", 0.5], ["make", 0.05], ["the", 0.01"], ["grow", 0.1"], ["fond", 0.5]]

Let's assume that:

  • all the words in the sentence are valid English words
  • popularity is an acceptable measure of difficulty/complexity
  • base word can be understood in any constructive way (see below)
  • difficulty/complexity is on scale from 0 - piece of cake to 1 - mind-boggling
  • difficulty bias is ok, better to be mistaken saying easy is though than the other way
  • working simple solution is preferred to flawless but complicated stuff
  • [edit] there is no interaction with user
  • [edit] we can handle any proper English input
  • [edit] a word is not more difficult than it's basic form (because as smart beings we can create unhappily if we know happy), unless it creates a new word (unlikely is not same difficulty as like)

General ideas:

I considered using Google searches or sites like Wordcount to estimate words popularity that could indicate its difficulty. However, both solutions give different results depending on the form of entered words. Google gives 316m results for fond but 11m for fonder, whereas Wordcount gives them ranks of 6k and 54k.

Transforming words to their basic forms is not a must but solves ambiguity problem (and makes it easy to create dictionary links), however it's not a simple task and its sense could me found arguable. Obviously fond should be taken instead of fonder, however investigating believe instead of unbelievable seems to be an overkill ([edit] it might be not the best example, but there is a moment when modifying basic word we create a new one like -> likely) and words like doorkeeper shouldn't be cut into two.

Some ideas of what should be consider basic word can be found here on Wikipedia but maybe a simpler way of determining it would be a use of a dictionary. For instance according to dictionary.reference.com unbelievable is a basic word whereas fonder comes from fond but then grow is not the same as growing

Idea of a solution:

It seems to me that the best way to handle the problem would be using a dictionary to find basic words, apply some of the Wikipedia rules and then use Wordcount (maybe combined with number of Google searches) to estimate difficulty.

Still, there might (probably is a simpler and better) way or ready to use algorithms. I would appreciate any solution that deals with this problem and is easy to put in practice. Maybe I'm just trying to reinvent the wheel (or maybe you know my approach would work just fine and I'm wasting my time deliberating instead of coding what I have). I would, however, prefer to avoid implementing frequency analysis algorithms or preparing a corpus of texts.

Bart
  • 19,692
  • 7
  • 68
  • 77
Legat
  • 1,379
  • 3
  • 11
  • 20
  • possible duplicate of [Determine the difficulty of an english word](http://stackoverflow.com/questions/5141092/determine-the-difficulty-of-an-english-word) – Jon Gauthier Apr 13 '13 at 14:57
  • I didn't find answer this topic. My main struggle is finding out difficulty based on real text with differently inflected forms. I think these two questions are related but different problems because producing basic words strongly affect the assessed difficulty. Also the focus here is on finding basic words. – Legat Apr 13 '13 at 16:05

2 Answers2

3

Some terminology:

  • The core part of the word is called a stem or a root. More on this distinction later. You can think of the root/stem as the part that carries the main meaning of the word and will appear in the dictionary.
  • (In English) most words are composed of one root (exception: compounds like "windshield") / one stem and zero or more affixes: the affixes that come after the root/stem are called suffixes, and the affixes that precede the root/stem are called prefixes. Examples: "driver" = "drive" (root/stem) + suffix "-er"; "unkind" = "kind" (root/stem) + "un-" (prefix).
  • Suffixes/prefixes (=affixes) can be inflectional or derivational. For example, in English, third-person singular verbs have an s on the end: "I drive" but "He drive-s". These kind of agreement suffixes don't change the category of the word: "drive" is a verb regardless of the inflectional "s". On the other hand, a suffix like "-er" is derivational: it takes a verb (e.g. "drive") and turns it into a noun (e.g. "driver")
  • The stem, is the piece of the word without any inflectional affixes, whereas the root is the piece of the word without any derivational affixes. For instance, the plural noun "drivers" is decomposable into "drive" (root) + "er" (derivational affix, makes a new stem "driver") + "s" (plural).
  • The process of deriving the "base" form of the word is called "stemming".

So, armed with this terminology it seems that for your task the most useful thing to do would be to stem each form you come across, i.e. remove all the inflectional affixes, and keep the derivational ones, since derivational affixes can change how common the word is considered to be. Think about it this way: if I tell you a new word in English, you will always know how to make it plural, 3rd-person singular, however, you may not know some of the other words you can derive from this). English being inflection-poor language, there aren't a lot of inflectional suffixes to worry about (and Google search is pretty good about stripping them off, so maybe you can use the Google's stemming engine just by running your word forms through google search and getting out the highlighted results):

  • Third singular verbal -s: "I drive"/"He drive-s"
  • Nominal plural `-s': "One wug"/"Two wug-s". Note that there are some irregular forms here such as "children", "oxen", "geese", etc. I think I wouldn't worry about these.
  • Verbal past tense forms and participial forms. The regular ones are easy: the past tense has -ed for past tense and past participle ("I walk"/"I walk-ed"/"I had walk-ed"), but there are quite a few of irregular ones (fall/fell/fallen, dive/dove/dived?, etc). Maybe make a list of these?
  • Verbal -ing forms: "walk"/"walk-ing"
  • Adjectival comparative -er and superlative -est. There are a few irregular/suppletive ones ("good"/"better"/"best"), but these should not present a huge problem.

These are the main inflectional affixes in English: I may be forgetting a few that you could discover by picking up an introductory Linguistics books. Also there are going to be borderline cases, such as "un-" which is so promiscuous that we might consider it inflectional. For more information on these types, see Level 1 vs. Level 2 affixation, but I would treat these cases as derivational for your purposes and not stem them.

As far as "grading" how common various stems are, besides google you could various freely-available text corpora. The wikipedia article linked to has a few links to free corpora, and you can find a bunch more by googling. From these corpora you can build a frequency count of each stem, and use that to judge how common the form is.

angelatlarge
  • 4,086
  • 2
  • 19
  • 36
  • Thanks! I never thought that English is in fact _inflection-poor_ but if that's the case, the task should be manageable. Also, a friend of mine suggested using dictionary api to get the stems easier. I will let you know as soon as I code something! :) – Legat Apr 16 '13 at 21:36
  • @Legat English is inflection-poor relative to some langauges (e.g. Spanish) and not to others (e.g. Chinese). Overall it is generally considered inflection-poor, however, for the purposes of NLP it might have just enough inflection to cause trouble :) – angelatlarge Apr 16 '13 at 21:38
0

I'm afraid there is no simple solution to the task of finding "basic" forms. I'm basing that on my memory of my Machine Learning textbook, of which language analysis was part of. You need some database, from which you can get them.

At the same time, please take note that the amount of words people use in everyday language is not that big. You can always ask a user what is the base form of a world you have not seen before. (unless this is your homework, which will be automatically checked)

Eventually, if you don't care about covering all words, you can create simple database, which would contain different forms of the most common words, and then try to use grammatical rules for the less common ones (which would be a good approximation, as actually, the most common words in English are irregular, whereas the uncommon ones are regular, because their original forms have been forgotten).

Note however, i'm no specialist, i'm simply trying to help :-)

Xyzk
  • 1,332
  • 2
  • 21
  • 36
  • Thanks @Xyzk. _Basic_ forms are just to group together similar words _fond, fonder_ or _goes, going, go_ so that they have same difficulty, can be automatically linked to dictionary definitions and so that modified words are as easy as basic forms _happy_ shouldn't be more difficult than _unhappily_. It's more of a hobby but I assume no interaction with users and handling possibly all the words (especially when using Google or Wordcount to estimate difficulty). – Legat Apr 13 '13 at 15:37