Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/361.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何使用wordnet拆分列名并查找字典含义?_Python_Nltk - Fatal编程技术网

Python 如何使用wordnet拆分列名并查找字典含义?

Python 如何使用wordnet拆分列名并查找字典含义?,python,nltk,Python,Nltk,我有下面的数据,我正试图得到字典的定义,但它只有在它是一个单词时才起作用。我怎样才能使它与多个单词一起工作 代码: 输出: pd.DataFrame(tmp).T 0 1 2 3 a plane figure bounded by the specified day of the month Sector: a plane figure bounded

我有下面的数据,我正试图得到字典的定义,但它只有在它是一个单词时才起作用。我怎样才能使它与多个单词一起工作

代码:

输出:

pd.DataFrame(tmp).T

                        0    1                               2      3
a plane figure bounded by       the specified day of the month  
Sector: a plane figure bounded by two radii and the included arc of a circle
Community: a group of people living in a particular local area, Name: a language unit by which a person or thing is known
Date: the specified day of the month
Community: a group of people living in a particular local area, Center: an area that is approximately central within some larger region, Point: a geometric element that has position but no extension
第1列和第3列为空,因为“社区名称”和“社区中心点”包含多个单词

期望输出:

                          0                                             1                                         2                                                                   3
Sector: [a plane figure...]   Community: [definition], Name: [definition]    Date: [the specified day of the month]  Community: [definition], Center: [definition], Point: [definition]
输出:

pd.DataFrame(tmp).T

                        0    1                               2      3
a plane figure bounded by       the specified day of the month  
Sector: a plane figure bounded by two radii and the included arc of a circle
Community: a group of people living in a particular local area, Name: a language unit by which a person or thing is known
Date: the specified day of the month
Community: a group of people living in a particular local area, Center: an area that is approximately central within some larger region, Point: a geometric element that has position but no extension