Find course name using nltk and python
Question: I am new to NLTK. I have a file with unstructured texts. from the text i want
to extract the phrases which define the course name or education.

ex: TEXT 1: I am an Mechanical Engineer TEXT 2: I have completed my graduation
in Computer Science Engineering

and words i want to extract are only "Mechanical Engineer" and "Computer
Science Engineering".

How this can be done ?? how to build regular expressions to match if
possible.?


Answer: If all you want to extract is "Mechanical Engineer" and "Computer Science
Engineering", then just import
[`re`](https://docs.python.org/2/library/re.html) (not `NLTK`) and search for:
`"[mM]echanical [eE]ngineer"` and `"[cC]computer [sS]cience [eE]ngineering".`

If on, the other hand, you want to do this for every major you university
offers, give [WordNet](http://www.nltk.org/howto/wordnet.html) a look. It has
support for tokenizing/lemmatizing ngrams (ideas that span more than one
word).

