Created
June 17, 2014 17:31
-
-
Save koorukuroo/d76d7f7cff61acf9ef18 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: utf-8 -*- | |
""" | |
Created on Wed Jun 18 01:37:57 2014 | |
@author: Kyunghoon Kim | |
""" | |
import urllib2 | |
import json | |
from collections import OrderedDict | |
s = "나는 밥을 먹었습니다" # input sentence | |
url = "http://newsjam.kr:8080/?s=" # morpheme analyzer | |
securitycode = '&securitycode=23485900349' # security number | |
response = urllib2.urlopen(url+s+securitycode) | |
data = json.load(response) | |
# for i, j in data.iteritems(): | |
# print i, j | |
ordering = OrderedDict(sorted(data.iteritems(), key=lambda x: x[1]['order'])) | |
for i, j in ordering.iteritems(): | |
print i, j['feature'] |
실행 결과물
나 NP
는 JX
밥 NNG
을 JKO
먹 VV
었 EP
습니다 EF
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2014/06/19 부산과고 형태소 분석기 실습
품사 태그 설명 : http://goo.gl/tI84DW