摘要:
from py2neo import Node,Relationship,Graph graph=Graph(user="neo4j",password="yiwoqu") a = Node("drug", name="Alice") b = Node("Person", name="Bob") ab = Relationship(a, "KNOWS", b) graph.create(ab) 阅读全文
posted @ 2019-09-18 14:55
依我去
阅读(636)
评论(0)
推荐(0)
摘要:
import numpy as np import json import codecs # 计算编辑距离 def edit_distance(word1, word2): len1 = len(word1) len2 = len(word2) dp = np.zeros((len1 + 1, len2 + 1)) for i in range(len1 + 1): dp[i][0] = i fo 阅读全文
posted @ 2019-09-18 14:42
依我去
阅读(1298)
评论(0)
推荐(0)
摘要:
import reimport codecsoperation_list = []operation_list_sort = []with codecs.open(r'C:\Users\Administrator.SC-201812211013\PycharmProjects\untitled29\ 阅读全文
posted @ 2019-09-18 14:41
依我去
阅读(609)
评论(0)
推荐(0)
摘要:
import re import jieba.analyse import codecs import pandas as pd def word_replace(xianbingshi,hospital1): """替换词表""" data = [] hospital = [] """去重""" with codecs.open(hospital1,'r... 阅读全文
posted @ 2019-09-18 14:40
依我去
阅读(1033)
评论(0)
推荐(0)
摘要:
import codecs import requests from bs4 import BeautifulSoup import re from lxml import etree url = 'https://jbk.jiankang.com/zhengzhuang/pinyin-z/?p=5' r = requests.get(url).text sym = re.findall(')'... 阅读全文
posted @ 2019-09-18 14:40
依我去
阅读(183)
评论(0)
推荐(0)
摘要:
import codecs def word_replace(word): """替换词表""" word_list = [] """去重""" with codecs.open(word,'r','utf8') as f: for line in f: line = line.strip() if... 阅读全文
posted @ 2019-09-18 14:39
依我去
阅读(1475)
评论(0)
推荐(0)
摘要:
import re import jieba.analyse import codecs import pandas as pd def simplification_text(xianbingshi): """提取文本""" xianbingshi_simplification = [] with codecs.open(xianbingshi,'r','utf8')... 阅读全文
posted @ 2019-09-18 14:38
依我去
阅读(5420)
评论(0)
推荐(0)
摘要:
import re import codecs word_a = r'症状.txt' word_b = r'C:\Users\Administrator.SC-201812211013\PycharmProjects\词表工作代码\yiwoqu\TXT\disease_0903.txt' list_a = [] list_b = [] with codecs.open(word_a,'r','ut 阅读全文
posted @ 2019-09-18 14:37
依我去
阅读(250)
评论(0)
推荐(0)
摘要:
import codecs file = r'C:\Users\Administrator.SC-201812211013\PycharmProjects\untitled29\yiwoqu\symptom1.txt' data = [] with codecs.open(file,'r','utf8') as f: for line in f: line = line.strip() line 阅读全文
posted @ 2019-09-18 14:36
依我去
阅读(125)
评论(0)
推荐(0)
摘要:
import re import codecs def joint_list(xianbingshi,xianbingshi_sub,list_write): xianbingshi_list_x =[] xianbingshi_list_y =[] xianbingshi_list_xy = [] with codecs.open(xianbingshi,'r... 阅读全文
posted @ 2019-09-18 14:35
依我去
阅读(195)
评论(0)
推荐(0)


浙公网安备 33010602011771号