Created
July 17, 2014 15:17
-
-
Save koorukuroo/4aea6353b20c789bb2bc to your computer and use it in GitHub Desktop.
2014 부산과고 R&E 수학분야 연구용 코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
import Umorpheme.morpheme as um | |
from collections import OrderedDict | |
s = "나는 멸치 볶음 보리 밥을 롯데리아에서 한예슬과 함께 먹었습니다. 롯데리아에는 맥도날드 해피밀이 없습니다." # input sentence | |
data = um.analyzer(s, '23485900349', "[롯데리아,맥도날드]", 1) | |
temp = {} | |
for key, value in data.items(): | |
temp[int(key)] = value | |
data = OrderedDict(sorted(temp.items())) | |
for i, j in data.iteritems(): | |
print i, j['data'], j['feature'] |
설치 방법
pip install umorpheme
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
실행 결과물