## 5 NLP Operators for Enhancing Partial M2M Transformations
### Advanced Text Processing Operators  
To categorize natural language-based text processing operators defined in our approach, we distinguish between text normalization, text recognition, and detection of semantic relationships. While text normalization and recognition both fall under the domain of computational linguistics, text normalization is more focused on obtaining base forms of nouns, verbs, or phrases, whereas recognition operators perform linguistic processing and categorization tasks to obtain particular classes or types of words.  
The following operators are defined for text normalization:  
* NORMALize(_phrase_): Normalizes the given text by converting a plural noun form to a singular form or converting a verb form to the present tense.
* INFINITIVE(_verb_): Gets an infinitive form for the given verb.
* STEM(_word_): Extracts a stem for the given word.  
* LEMMA(_word_, _pos_): Gets a lemma for the given word when a particular part of speech (POS) is defined. The following operators are defined for linguistic text processing:
* POS(_word_): Gets a part of speech for the given word. If more than one part of speech option is identified, only the first one is returned.
* EXTRACTNE(_phrase_, _type_): Extracts named entities (individual concepts) from the given phrase. If _type_ is not set, it will try to extract all existing named entities; otherwise, it will try to find entities of the defined type. Currently, _Location_, _Person_, _Organization_, and _Time_ entity types are supported in the implementation.
* EXTRACTVERB(_phrase_): Extracts a verb or a verb phrase from the given phrase.
* EXTRACTNOUN(_phrase_, 'all'): Extracts a noun or a noun phrase from the given phrase. Setting the second parameter to 'all' allows one to extract all possible nouns/noun phrases; otherwise, the most general noun phrase is extracted.
* CONTAINS(_phrase\({}_{1}\)_, phrase\({}_{2}\)_): Returns _true_ if \({\it phrase}_{1}\) contains \({\it phrase}_{2}\) and \({\it false}\) otherwise.
* CONTAINSNE(_phrase_, _entity_): Checks whether the given _phrase_ contains a particular named _entity_; returns _true_ if such entity was found and _false_ otherwise.
* TYPENE(_phrase_): Extracts named entities from the given phrase and determines their types. The determined types are returned together with corresponding entities. Currently, 'Location', 'Person', 'Organization', and 'Time' entity types are supported.
* ISNOUNPHRASE(_phrase_): Determines whether the given phrase is a noun phrase; returns _true_ if this condition is satisfied and _false_ otherwise.
* ISVERBPHRASE(_phrase_): Determines whether the given phrase is a verb phrase; returns _true_ if this condition is satisfied and _false_ otherwise.  
The third group of operators is for semantic relation detection. These operators are defined for the processing of noun phrases only:  
* ISSYNONYM(_phrase\({}_{1}\)_, phrase\({}_{2}\)_): Returns _true_ if \({\it phrase}_{1}\) is a synonym of \({\it phrase}_{2}\) and \({\it false}\) otherwise.
* ISHYPONYM(_phrase\({}_{1}\)_, phrase\({}_{2}\)_): Returns _true_ if \({\it phrase}_{1}\) is a hyponym of \({\it phrase}_{2}\) and \({\it false}\) otherwise.
* ISHYPERNYM(_phrase\({}_{1}\)_, phrase\({}_{2}\)_): Returns _true_ if \({\it phrase}_{1}\) is a hypernym of \({\it phrase}_{2}\) and \({\it false}\) otherwise.
* ISMERONYM(_phrase\({}_{1}\)_, phrase\({}_{2}\)_): Returns _true_ if \({\it phrase}_{1}\) is a meronym of \({\it phrase}_{2}\) and \({\it false}\) otherwise.
* ISHOLONYM(_phrase\({}_{1}\)_, phrase\({}_{2}\)_): Returns _true_ if \({\it phrase}_{1}\) is a holonym of \({\it phrase}_{2}\) and \({\it false}\) otherwise.