Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nlp_libpython/INSTALL_MLW.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cd
vi .profile # edit to add: export PATH=$PATH:~/bin
lein
python3 -m pip install numpy nltk spacy
python3 -m pip install transformers torch
rm install-clojure
# install Carin Meier's excellent examples for using many Python libraries:
git clone https://github.com/gigasquid/libpython-clj-examples.git
Expand Down
2 changes: 1 addition & 1 deletion nlp_libpython/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clojars" {:url "https://clojars.org/repo"}}

:dependencies [[org.clojure/clojure "1.10.1"]
[clj-python/libpython-clj "1.37"]
[clj-python/libpython-clj "2.023"]
[clj-http "3.10.3"]
[com.cemerick/url "0.1.1"]
[org.clojure/data.csv "1.0.0"]
Expand Down
6 changes: 3 additions & 3 deletions nlp_libpython/src/nlp_libpython_spacy/core.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns nlp-libpython-spacy.core
(:require [libpython-clj.require :refer [require-python]]
[libpython-clj.python :as py :refer [py. py.-]])
(:require [libpython-clj2.require :refer [require-python]]
[libpython-clj2.python :as py :refer [py. py.-]])
(:require [knowledge-graph-navigator-clj.entity-text-by-uri :as kgn]))

(require-python '[spacy :as sp])
Expand Down Expand Up @@ -66,4 +66,4 @@
(qa "what does Bill enjoy?"
"Since last year, Bill lives in Seattle. He likes to skateboard.")
(spacy-qa-demo "what is the population of Paris?")
(spacy-qa-demo "where does Bill Gates Work?"))
(spacy-qa-demo "where does Bill Gates work?"))
2 changes: 1 addition & 1 deletion nlp_libpython/test/nlp_libpython_spacy/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

(test/deftest tokenization-test
(test/testing "tokenization test"
(test/is (= 033 (count (sp/text->tokens test-text))))))
(test/is (= 19 (count (sp/text->tokens test-text))))))