![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
fengshanghere
这个作者很懒,什么都没留下…
展开
-
python 自然语言处理学习笔记
一 NLTK的几个常用函数1 concordance 这个函数就是用来搜索单词word在text 中出现多的情况,包括出现的那一行,重点强调上下文。从输出来看 concordance 将要查询的单词,基本显示在一列,这样容易观察其上下文.例如>>> text1.concordance("monstrous")Displaying 11 of 11 matches:ong th...原创 2018-04-03 18:47:36 · 1138 阅读 · 0 评论 -
python 引用(import)文件夹下的py文件的方法
Python包含子目录中的模块方法比较简单,关键是能够在sys.path里面找到通向模块文件的路径。下面将具体介绍几种常用情况:(1)主程序与模块程序在同一目录下:如下面程序结构:`-- src |-- mod1.py `-- test1.py 若在程序test1.py中导入模块mod1, 则直接使用import mod1或from mod1 import *;(...转载 2018-10-08 15:02:14 · 60875 阅读 · 4 评论