一只蟒蛇的客户端

sherlok的Python项目详细描述


是一个灵活且功能强大的开源分布式实时文本挖掘引擎。

pipinstall--upgradesherlokfromsherlokimportSherloks=Sherlok('neuroner')# returns a list of tuples (begin, end, text, annotation_type, attributes{})prints.annotate('layer 4 neuron')[(0,14,'layer 4 neuron',u'Neuron',{}),(8,14,'neuron',u'Neuron',{}),(8,14,'neuron',u'NeuronTrigger',{}),(0,7,'layer 4',u'Layer',{u'ontologyId':u'HBP_LAYER:0000004'})]# filtering and finding the text backtxt='parvalbumin-positive fast-spiking basket cells, somatostatin-positive regular-spiking bipolar and multipolar cells, and cholecystokinin-positive irregular-spiking bipolar and multipolar cells'morphology=s.annotate(txt,u'Morphology')for(start,end,text,_type,properties)inmorphology:printtext,properties[u'ontologyId']basketHBP_MORPHOLOGY:0000019bipolarHBP_MORPHOLOGY:0000006multipolarHBP_MORPHOLOGY:0000035bipolarHBP_MORPHOLOGY:0000006multipolarHBP_MORPHOLOGY:0000035

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
字典java cassandra对象映射注释   java定制Solr TokenFilter lemmatizer   字符串从Java文件中读取windows文件名   java如何在Windows上设置StanfordCorenlp服务器以返回文本   java axis2“意外的子元素值”   java使用POI HSSF获取错误   多线程Java等待计时器线程完成   java ForkJoinPool BuffereImage处理风格   从java代码运行Python脚本   java将字节[]转换为短[],使每个短元素包含13位数据   java如何为swing jframe应用程序将代码划分为类   java使用okhttp更改baseurl   java AlertDialog。建设者setView导致堆栈溢出错误   java如何在特定的radius 安卓 studio中接收地址列表?