Is there any instrument to build ontonymy of the text. The same question about metonymy - is there any opotunity to find out metonymy in sense/text?
Thanks in advance.
Is there any instrument to build ontonymy of the text. The same question about metonymy - is there any opotunity to find out metonymy in sense/text?
Thanks in advance.
Ontology
There is nothing particular in NLTK that you can use to create an ontology based on text with NLTK. You will have to get concepts out of text (you can start with Named entity Recognition, Multi-Word Expressions or Information Extraction). The rest is about somehow linking to existing ontologies (e.g. you can start with topics related to your text).
Metonymy
You can use WordNet to identify metonimic relationships with the words or concepts from the text you process. This is doable via the NLTK interface to WordNet. You would have to identify a synset containing your concept / word and traverse along metonimic relationship of that synset with another. Your question could lead to wildly varying implementations depending on the requirements you have so let me leave you with a hint snippets here.