Skip to content

hmatsu47/vaccinecert-qa-similarity-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vaccinecert-qa-similarity-test

Install MeCab & dictionary (for Mac)

brew install mecab
brew install mecab-ipadic

Install MeCab & dictionary (for Ubuntu)

sudo apt-get install -y mecab libmecab-dev mecab-ipadic-utf8
git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git
cd mecab-ipadic-neologd
./bin/install-mecab-ipadic-neologd -n -y
echo dicdir = `mecab-config --dicdir`"/mecab-ipadic-neologd" > mecabrc 
sudo cp mecabrc /usr/local/etc

Install Python library

pip install numpy mecab-python3 sklearn

Usage

python3 tool/data-creator/qa-similarity.py data/faq/faq.json 3 > data/faq/similarity.json
  • data/faq/faq.json
    • input file
  • 3
    • count of similar questions
  • data/faq/faq-similarity.json
    • output file

Reference

Releases

No releases published

Packages

No packages published