Created
February 1, 2021 01:20
-
-
Save dmgerman/98d8918cd1e9782c52e62912c83722a9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/bash | |
# replace the next line with the location of your addon | |
MDIR=/home/dmg/.local/share/Anki2/addons21/MecabUnidic/support | |
export LD_LIBRARY_PATH=$MDIR: | |
export DYLD_LIBRARY_PATH=$MDIR: | |
#$MDIR/mecab.lin --eos-format='\n' --unk-format='' -d $MDIR -r $MDIR/mecabrc "$1" | |
# MECAB_NODE_UNIDIC_22_PARTS = ['%f[7]', '%f[10]', '%m', '%f[6]', '%f[0]', '%f[1]'] | |
# i swapped the location of %m to first column | |
#$MDIR/mecab.lin -P | |
$MDIR/mecab.lin --eos-format='\t\t\t\tEOS\tEOS\n' --unk-format='%M\t%f[0]\t%M\t%f[1]\tunknown\tunknown\n' --node-format='%f[7]\t%f[10]\t%m\t%f[6]\t%f[0]\t%f[1]\n' -d $MDIR -r $MDIR/mecabrc "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment