admin管理员组

文章数量:1122846

I am trying to use WordNet in R to determine the domain of a list of words (e.g., sports, biology) and represent the results in a dataframe. The goal is to create a dataframe where each domain is a column, and each cell contains 0 or 1 depending on whether the word is associated with that domain.

Example:

Input

| word   |
|--------|
| soccer |
| pie    |
| gene   |

Output

| word   | sports | biology | ... |
|--------|--------|---------|-----|
| soccer | 1      | 0       | ... |
| pie    | 0      | 0       | ... |
| gene   | 0      | 1       | ... |

I've installed the wordnet R package, but it seems that it does not have access to WordNet Domains. Is there a good way to achieve this goal?

Thank you!

本文标签: nlpHow to get domain of words using WordNet in RStack Overflow