Ning Sun avatar Ning Sun committed 94f8ed4

update exameples

Comments (0)

Files changed (6)

 /native
 /.lein-failures
 /checkouts
-/.lein-deps-sum
+*/.lein-deps-sum
 
 ### server
 
-    lein run -m redday.core
+    lein run
 
 ### client
 
-    lein run -m slacker-client-demo.core programming
+    lein run programming
 

slacker-server-demo/.lein-deps-sum

-1fd06469b6cb4e3ee5bbd4c52931b4943e726911

slacker-server-demo/project.clj

   :description "FIXME: write description"
   :dependencies [[org.clojure/clojure "1.2.1"]
                  [slacker "0.7.0-SNAPSHOT"]
-                 [reddit.clj "0.3.2"]
+                 [reddit.clj "0.3.3"]
                  [clojure-opennlp "0.1.7"]]
   :main redday.core)

slacker-server-demo/resources/log4j.properties

 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.Target=System.out
 log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
-log4j.rootLogger=info, stdout
+log4j.rootLogger=warn, stdout

slacker-server-demo/src/redday/stats.clj

   (:require [opennlp.nlp :as nlp])
   (:require [opennlp.tools.filters :as nlp-filters]))
 
-(def tokenizer (nlp/make-tokenizer "model/en-token.bin"))
-(def pos-tag (nlp/make-pos-tagger "model/en-pos-maxent.bin"))
+(def ^{:private true} tokenizer (nlp/make-tokenizer "model/en-token.bin"))
+(def ^{:private true} pos-tag (nlp/make-pos-tagger "model/en-pos-maxent.bin"))
 
 (defn- filter-words [sentence]
   (map first (nlp-filters/nouns (pos-tag (tokenizer sentence)))))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.