Log In
|
Sign Up
Search
ksm-collocation 사용 예제
Writer
오창민
Description
5.0에서부터 지원됩니다. collocation은 결과로 `tuple
`의 리스트를 리턴합니다. 투플의 첫 인자를 모아서 결과로 리턴하는 예제입니다. (`list
`으로 받음) ``` #library collocation typedef tuple
tsif; // collocation module return type string generate_tags(string text, int lb_count=2) { collocation::bigram coll; coll.from(kwd(text,'korean','utf8','tiw-','').replace('\n',' ')); tsif t; list
tags; for t in coll.get(lb_count) { tags.append(t[0]); } return ",".join(tags); } ```
Tag
샘플코드 collocation ksm-collocation 공기어 분석
Module Name
Attachments
Comments
Save
Save
Cancel
Save
Cancel
Warning
Login