Upgrade to Pro — share decks privately, control downloads, hide ads and more …

懐かしきCaboChaのレシピをもう一度

log5
September 12, 2024
45

 懐かしきCaboChaのレシピをもう一度

log5

September 12, 2024
Tweet

Transcript

  1. Πϯετʔϧͯ͠ΈΑ͏ ެࣜαΠτΛಡ΋͏(ಛʹWindows؀ڥͷํ) https: // taku910.github.io/cabocha/ ࣄલʹ CRF ++ ͱ MeCab

    ΛΠϯετʔϧ͢Δ Chasen Ͱ͸ಈ࡞͠·ͤΜ macOSͳΒ brew install cabocha ͰҰൃ
  2. ࠷ॳʹ cabocha Λ࠶Πϯετʔϧ ࣍ʹ cabocha-python Λ࠶Πϯετʔϧ Apple Silicon Mac ʹద߹͢ΔͨΊ

    ARCHFLAGS='-arch arm64’ ιʔείʔυ͔ΒόΠφϦΛίϯύΠϧ͢ΔͷͰ -- compile Λ͚ͭΔ
  3. “cabocha-python” Λ࢖ͬͯΈΑ͏ ParserΛ࡞Γɺ෼ղ͢Δ ͨͩ͠ɺ෼ੳ݁Ռ(͜͜Ͱ͸ results)͸গ͠ѻ͍ͮΒ͍ ʮ͜ͷΑ͏ʹॻ͘ͷͩʯͱ͍͏આ໌͕ͦ΋ͧ΋Ϝζ͍ import CaboCha cabocha_parser =

    CaboCha.Parser() # ղੳثΛ࡞Δ results = cabocha_parser.parse("͜͜ʹ޷͖ͳจষ") # ղੳ͢Δ ԿΛॻ͚͹͍͍ʁʁʁʁʁʁʁʁʁʁʁʁ
  4. CaboChaͷཪଆ ژ౎େֶςΩετίʔύε 4 . 0 ຖ೔৽ฉͷهࣄʹ֤छݴޠ৘ใΛਓखͰ෇༩ 1995 ೥ 1 ݄

    1 ೔͔Β 17 ೔·Ͱͷશهࣄɺ໿ 2 ສจɺ 1 ݄͔Β 12 ݄ ·Ͱͷࣾઆهࣄɺ໿ 2 ສจɺܭ໿ 4 ສจʹରͯ͠ɺܗଶૉɾߏจ ৘ใΛ෇༩