Skip to content

Instantly share code, notes, and snippets.

@koorukuroo
Created June 17, 2014 17:31
Show Gist options
  • Save koorukuroo/d76d7f7cff61acf9ef18 to your computer and use it in GitHub Desktop.
Save koorukuroo/d76d7f7cff61acf9ef18 to your computer and use it in GitHub Desktop.
2014 부산과고 R&E 수학분야 연구용 코드
# -*- 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']
@koorukuroo
Copy link
Author

2014/06/19 부산과고 형태소 분석기 실습

품사 태그 설명 : http://goo.gl/tI84DW

@koorukuroo
Copy link
Author

실행 결과물

나 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