一只蟒蛇的客户端

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第三方库


热门话题
将输入迷宫文件中的字符存储到2d数组(Java)   Vaadin中的java CDi未注入:NullPointerException   两个java日期之间的差异   java如何使用@patch使用jpa存储库更新单个字段   java GeoWebCache和osmdroid   Java:如何让对象侦听器在不同的类中工作?   对象的java子集   安全性无法在Java中设置客户端X509身份验证   java如何在安卓中将唯一的单词绑定到字符串   java如何读取txt并通过管道对其进行分隔   java如何避免if   java JSP带有一个HTML表,需要更新该表   java HashMap<String,Value>。remove()通过使用字符串同步。在钥匙上,这有用吗?还是这个坏代码?   java我的继承有问题