Skip to content

Commit e358784

Browse files
committed
directory structure
1 parent fe30691 commit e358784

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ pom.xml.asc
1010
.hgignore
1111
.hg/
1212
*.csv
13-
/executable

fasttext/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore

readme.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# simple-fasttext-server
22

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.
44
Work In Progress.
55

66
## Installation
77

88
1. install [leiningen](https://leiningen.org/)
99
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)
1114

1215
## Usage
1316

src/clojure/process_wrapper/main.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
(println "server starting")
1010

1111
(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"])
1313
classify
1414
(fn [ctx]
1515
(let [text (str (get-in ctx [:parameters :query :text]) "\n")]

0 commit comments

Comments
 (0)