예제 #1
0
파일: q25.py 프로젝트: muramasa2/2020nlp100
def baseinf():
    text = extract_british()
    list = text.split('\n')
    dict = {}
    for line in list:
        re_ = re.search('\|(.*?)\s=(.*?)$', line)
        if re_ is not None:
            dict[re_.group(1)]  = re_.group(2)
            # print(dict)
    return dict
예제 #2
0
파일: q21.py 프로젝트: muramasa2/2020nlp100
import sys

sys.path.append('./3')
from q20 import extract_british

text = extract_british()
list = text.split('\n')
for line in list:
    if 'Category' in line:
        print(line)