Skip to content

Commit

Permalink
Make classifier installable
Browse files Browse the repository at this point in the history
  • Loading branch information
dspinellis committed Apr 11, 2013
1 parent 887f555 commit 3d52867
Show file tree
Hide file tree
Showing 4 changed files with 219,947 additions and 14 deletions.
25 changes: 12 additions & 13 deletions Makefile
@@ -1,22 +1,21 @@
ngram.el: ngram.pl
INSTPREFIX=/usr/local

install:
mkdir -p $(INSTPREFIX)/lib/greek-classifier
install -m 644 ngram.all ngram.el $(INSTPREFIX)/lib/greek-classifier/
install greek-classifier.pl $(INSTPREFIX)/bin/greek-classifier

# The following rules serve only documentation purposes
ngram.el: greek-classifier.pl
awk -F';' '{print $$1}' onomata_epitheta.csv | \
sed '1d;s/"//g;s/ *$$//' | \
grconv -S UTF-8 -x transcribe | \
grep -v '[^A-Z]' | \
perl ngram.pl | \
perl greek-classifier.pl -g | \
sort -t' ' -k2gr >$@

sample.txt: greek.dg
cat CCRacist/*.txt ;

train.txt: sample.txt
head -2000 $< >$@

test.txt: sample.txt
tail -2000 $< >$@

ngram.all: mixed-surnames.txt
perl ngram.pl $< | \
ngram.all: mixed-surnames.txt greek-classifier.pl
perl greek-classifier.pl -g $< | \
sort -t' ' -k2gr >$@

# Extract mixed names
Expand Down
2 changes: 1 addition & 1 deletion classify.pl → greek-classifier.pl
Expand Up @@ -17,7 +17,7 @@
# Default field separator
$opt_t = '\s+';

if (!getopts('Dd:k:lt:uw')) {
if (!getopts('Dd:gk:lt:uw')) {
main::HELP_MESSAGE(*STDERR);
exit 1;
}
Expand Down

0 comments on commit 3d52867

Please sign in to comment.