I have texts in English and German containing "dictionary words" and names.
e.g. "... In Florence the painter Leonardo built ..."
I have a Java program where need to determine for each word if it is a name or a word of the respective language.
e.g. names={..., Florence, Leonardo, ...}, language words={..., In, the, painter, built, ...}
I see two approaches:
use a respective dictionary list, load it into a hash structure, see if the word is in it (language word) or not (name / misspelled).
Problems / Issues:
I couldn't find a German word list where names are excluded
word flexions (complicated in German) may not be in the list
use a service / an api to translate single words into another language, see if the word is changed (language word) or not (name / misspelled).
Problems / Issues:
names may be translated as well, e.g. Florence > Florenz
I couldn't find an offline dictionary list / api. So I suppose using an online service is the way to go, but the big ones like google translate are not free.
Of course, there are names which resemble dictionary words and in both approaches they are identified as dictionary words which is fine.
The main question is: Are there comprehensive dictionary lists without names in English and German, at best with word flexions?
Alternatively: Is there a free (online) API to do the task? Is there another solution?