2019年1月25日

nltk

摘要: 分词,保留网址url。 nltk.casual_tokenize('Enigma (now part of PTC http://www.linkedin.com/company/ptc)')[u'Enigma', u'(', u'now', u'part', u'of', u'PTC', u'ht 阅读全文

posted @ 2019-01-25 09:32 bingwork 阅读(224) 评论(0) 推荐(0) 编辑

2018年9月27日

python unittest 测试所有相关单元测试

摘要: python unittest 测试所有相关单元测试python -m unittest discover project_directory "ut_*.py" python unittest 测试所有相关单元测试python -m unittest discover project_direct 阅读全文

posted @ 2018-09-27 17:16 bingwork 阅读(128) 评论(0) 推荐(0) 编辑

2018年8月6日

语言检测 language detection langid langdetect

摘要: 比较 langid 和 langdetect python2.7 import langidlangid.classify("This is a test")('en', -54.41310358047485)langid.classify("你好 世界")('zh', -74.8939242362 阅读全文

posted @ 2018-08-06 12:48 bingwork 阅读(441) 评论(0) 推荐(0) 编辑

2018年6月14日

mysql 操作记录

摘要: 一些重要操作记录。避免重复插入INSERT INTO lhlh_emotion (word, freq, tag) SELECT '{emotion}', 100, 'a' from DUAL where not exists(select word from lhlh_emotion where 阅读全文

posted @ 2018-06-14 15:32 bingwork 阅读(120) 评论(0) 推荐(0) 编辑

2018年6月5日

linux系统常用命令

摘要: 此处记录备份一些平时工作常用命令。 1、查询某些字段所在的进程 ps -aux|grep main.py 2、进一步查看进程详情 比如上一步对应的 pid 为 9908 ll /proc/9908 阅读全文

posted @ 2018-06-05 14:05 bingwork 阅读(136) 评论(0) 推荐(0) 编辑

2018年4月25日

neo4j中cypher语句多个模糊查询

摘要: 总结一下经验: neo4j中,cypher语句的模糊查询,好像是个正则表达式结构。 对于一个属性的多个模糊查询,可以使用如下写法: 比如,查询N类型中,属性attr包含‘a1’或者‘a2’的所有节点。 match (n:N) where n.attr =~ '.*a1.*|.*a2.*' retur 阅读全文

posted @ 2018-04-25 15:39 bingwork 阅读(9136) 评论(0) 推荐(0) 编辑

导航