Skip to content

Commit

Permalink
add opennlp
Browse files Browse the repository at this point in the history
  • Loading branch information
dainiusjocas committed Aug 10, 2023
1 parent c705745 commit edd9c8c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 16 deletions.
29 changes: 15 additions & 14 deletions deps.edn
@@ -1,20 +1,21 @@
{:paths
["src" "resources"]
:deps
{org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/tools.cli {:mvn/version "1.0.219"}
org.apache.lucene/lucene-core {:mvn/version "9.7.0"}
org.apache.lucene/lucene-analysis-common {:mvn/version "9.7.0"}
org.apache.lucene/lucene-monitor {:mvn/version "9.7.0"}
org.apache.lucene/lucene-queries {:mvn/version "9.7.0"}
org.apache.lucene/lucene-queryparser {:mvn/version "9.7.0"}
metosin/jsonista {:mvn/version "0.3.7"}
lt.jocas/lucene-custom-analyzer {:mvn/version "1.0.28"}
lmgrep/lucene-monitor-helpers {:local/root "modules/lucene-monitor-helpers"}
lt.jocas/lucene-query-parsing {:mvn/version "1.0.8"}
lt.jocas/lucene-text-analysis {:mvn/version "1.0.21"}
babashka/fs {:mvn/version "0.4.19"}
com.github.clj-easy/graal-build-time {:mvn/version "1.0.5"}}
{org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/tools.cli {:mvn/version "1.0.219"}
org.apache.lucene/lucene-core {:mvn/version "9.7.0"}
org.apache.lucene/lucene-analysis-common {:mvn/version "9.7.0"}
org.apache.lucene/lucene-analysis-opennlp {:mvn/version "9.7.0"}
org.apache.lucene/lucene-monitor {:mvn/version "9.7.0"}
org.apache.lucene/lucene-queries {:mvn/version "9.7.0"}
org.apache.lucene/lucene-queryparser {:mvn/version "9.7.0"}
metosin/jsonista {:mvn/version "0.3.7"}
lt.jocas/lucene-custom-analyzer {:mvn/version "1.0.28"}
lmgrep/lucene-monitor-helpers {:local/root "modules/lucene-monitor-helpers"}
lt.jocas/lucene-query-parsing {:mvn/version "1.0.8"}
lt.jocas/lucene-text-analysis {:mvn/version "1.0.21"}
babashka/fs {:mvn/version "0.4.19"}
com.github.clj-easy/graal-build-time {:mvn/version "1.0.5"}}
:aliases
{:dev
{:extra-paths ["dev" "test" "test/resources"]
Expand Down
9 changes: 7 additions & 2 deletions test/lmgrep/lucene/analysis_test.clj
Expand Up @@ -155,7 +155,9 @@
tokenizer-names (keys components)
args {"simplepatternsplit" {"pattern" " "}
"simplepattern" {"pattern" " "}
"pattern" {"pattern" " "}}]
"pattern" {"pattern" " "}
"opennlp" {"sentenceModel" "test/resources/opennlp-en-ud-ewt-sentence-1.0-1.9.3.bin"
"tokenizerModel" "test/resources/opennlp-en-ud-ewt-tokens-1.0-1.9.3.bin"}}]
(is (seq tokenizer-names))
(doseq [tokenizer-name tokenizer-names]
(try
Expand Down Expand Up @@ -201,7 +203,10 @@
"hunspellstem" {"dictionary" "test/resources/hunspell_dict.dic"
"affix" "test/resources/hunspell_dict.aff"}
"dropifflagged" {"dropFlags" "2"}
"word2vecsynonym" {"model" "test/resources/word2vec-model.zip"}}]
"word2vecsynonym" {"model" "test/resources/word2vec-model.zip"}
"opennlppos" {"posTaggerModel" "test/resources/opennlp-en-ud-ewt-pos-1.0-1.9.3.bin"}
"opennlplemmatizer" {"dictionary" "test/resources/en-lemmatizer.dict"}
"opennlpchunker" {"chunkerModel" "test/resources/en-chunker.bin"}}]
(is (seq token-filter-names))
(doseq [token-filter-name token-filter-names]
(try
Expand Down
Binary file added test/resources/en-chunker.bin
Binary file not shown.
2 changes: 2 additions & 0 deletions test/resources/en-lemmatizer.dict
@@ -0,0 +1,2 @@
AWOL JJ AWOL
Aaronic JJ Aaronic
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit edd9c8c

Please sign in to comment.