File tree 4 files changed +10
-4
lines changed
src/clojure/process_wrapper 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,3 @@ pom.xml.asc
10
10
.hgignore
11
11
.hg /
12
12
* .csv
13
- /executable
Original file line number Diff line number Diff line change
1
+ # Ignore everything in this directory
2
+ *
3
+ # Except this file
4
+ ! .gitignore
Original file line number Diff line number Diff line change 1
1
# simple-fasttext-server
2
2
3
- You send a REST get with some text, and get a classification for it.
3
+ You send a REST GET with some text, and get a classification for it.
4
4
Work In Progress.
5
5
6
6
## Installation
7
7
8
8
1 . install [ leiningen] ( https://leiningen.org/ )
9
9
2 . clone this repo
10
- 3 . ` lein run `
10
+ 3 . change directory to the included directory ` fasttext ` .
11
+ 4 . git clone [ fasttext] ( https://github.com/facebookresearch/fastText ) here.
12
+ 3 . place your trained fasttext model here as well (should be named ` classifier.bin ` ).
13
+ 4 . ` lein run ` (takes few seconds to start up)
11
14
12
15
## Usage
13
16
Original file line number Diff line number Diff line change 9
9
(println " server starting" )
10
10
11
11
(let
12
- [process (attach [" executable /fastText/fasttext" " predict-prob" " executable /classifier.bin" " -" " 5" ])
12
+ [process (attach [" fasttext /fastText/fasttext" " predict-prob" " fasttext /classifier.bin" " -" " 5" ])
13
13
classify
14
14
(fn [ctx]
15
15
(let [text (str (get-in ctx [:parameters :query :text ]) " \n " )]
You can’t perform that action at this time.
0 commit comments