I was trying semcor corpus in nltk.
I found this code here:
>>> list(map(str, semcor.tagged_chunks(tag='both')[:3]))I tried the same on colab (check last cell in this notebook):
>>> list(map(str, semcor.tagged_chunks(tag='both')[:3]))Note that docs output tag contains sense stem state in state.v.01.say.
But I didn't get sense stem state in the output tag in say.v.01.
Why the difference in the output? What I am missing here?
( In fact, I have a colab notebook in which code line executed yesterday outputted sense stem, but code line (in the same notebook) executed today did not output sense stem. I compared output of pip list executed yesterday and today and they are exactly the same. So I was wondering what's going wrong within the same notebook. I did not give the details here because I don't want to complicate and want to focus on above question. Just to point out, my colleague is also not getting sense stem in jupyter notebook running on his local machine. Fortunately, on my local jupyter, I am getting sense stem. Hope, it will not vanish.)
PS: Earlier, I wrote same post, but I do not find it in the group. I dont recall if I clicked Post message button or delete button. But if it takes some time to appear in the group, then this message will be duplicate. Apologies, in advance. This is my post here.
I knew that semcor uses wordnet senses to tag to subset of brown corpus. But I was not aware that semcor APIs can work with or without wordnet predownloaded and it will give tags in different format in these different scenarios. I honestly feel, at least semcor API documentation should have some mention of this.
So, without wordnet predownloaded, it does not return sense stems:
With wordnet pre-downloaded, it does return sense stems: