Closed yuiseki closed 3 years ago
以下の単語を含むニュースの位置情報がタイと誤判定されてしまっている
実装見てないのですが、雑に考えるとタイの前後両方にカタカナが無いということを見るとか?(他の地名もニュースの文脈で前後両方にカタカナがくっつくのは直感ではあまり無さそうなので一般化しても良いかも?
タイ
https://github.com/yuiseki/crisis-news-map-next/blob/main/src/lib/detector.ts#L206 https://github.com/yuiseki/crisis-news-map-next/blob/main/src/data/geonlp.ex.nii.ac.jp/geonlp_world_country_20130912_u.csv
detectCountry() 読んでます。
detectCountry()
kuromojin という npm パッケージ使うと形態素解析できますが、 ちょっと大がかりな感じ……
kuromojin
https://takuyaa.github.io/kuromoji.js/demo/tokenize.html
以下の単語を含むニュースの位置情報がタイと誤判定されてしまっている