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
(import concurrent.futures) | |
(import sys) | |
(import subprocess) | |
(import time) | |
(import [collections [defaultdict]]) | |
(import [data [sentences]]) | |
(defn sent2kgram [sentence &optional [k (int "2")] [delimiter " "]] | |
(setv sentence (str (.getoutput subprocess (.format "echo {0} | mecab -O wakati" sentence)))) |