kollocate

Collocation Search of Korean


Keywords
collocation, korean
License
Apache-2.0
Install
pip install kollocate==0.0.2

Documentation

Collocation Search of Korean

Let's find out which words are used together with a certain word.

Requirements

  • python >=3.6
  • whoosh

Example

>>> from search import Collocate
>>> c = Collocate()
>>> q = "๋จน" # drop the final ending "-๋‹ค" for verbs/adjectives.
>>> collocates = c(q)
>>> for pos, cols in collocates.items():
>>>    print(q + " as " + pos)
>>>    for pos2, cols2 in cols.items():
>>>        print(pos2, ", ".join(word + "(" + str(cnt) + ")" for word, cnt in cols2))
๋จน as verb
noun ๊ฒƒ(39), ์ˆ˜(29), ์Œ์‹(23), ๋“ฑ(16), ๊ณ ๊ธฐ(14), ..
verb ํ•˜(33), ์•Š(21), ์‚ด(17), ์ฆ๊ธฐ(11), ๊ตฝ(9), ..
adverb ๋งŽ์ด(10), ์ฃผ๋กœ(7), ๋‹ค(5), ๊ฐ™์ด(4), ์ž˜(4), ...
determiner ๋‹ค๋ฅธ(5), ๊ทธ(2), ์—ฌ๋Ÿฌ(1), ์„ธ(1), ๋ช‡๋ช‡(1), ์ƒˆ(1)
adjective ์‹ถ(5), ์–ด๋ฆฌ(1), ํŽธํ•˜(1), ์ž‘(1), ์ข‹(1), ์†์‰ฝ(1), ๋ชปํ•˜(1)

๋จน as noun
noun ๋ถ“(3), ์ข…์ด(2), ๋ฌ˜์„ (1), ์ฒญ์ž(1), ์€์žฅ๋„(1), ์ œ์กฐ(1), ..
verb ์˜ํ•˜(1), ๊ทธ๋ฆฌ(1), ์ฐ(1), ์ฐจ(1), ๋Š˜์–ด๋†“(1)
adverb ํ•˜์ง€๋งŒ(1)