The lookup tool is shortly described at the lookup documentation page at. Here is some info on lookup that is relevant to the present project.
Note the flags,
The mb flag tells that lookup accepts multicharacter input both in the upper and lower language, which is crucial since we use UTF-8. The TT flag tells that there is no separator between the lexeme and the tags to follow it.