work around withMutProperties bug
This commit is contained in:
@@ -31,7 +31,8 @@
|
|||||||
(unless (filesLearnedFrom.exists path)
|
(unless (filesLearnedFrom.exists path)
|
||||||
(print "learning from $file")
|
(print "learning from $file")
|
||||||
(learnFrequencies (File.getContent file))
|
(learnFrequencies (File.getContent file))
|
||||||
(dictSet filesLearnedFrom path true))))))
|
(dictSet filesLearnedFrom path true))))
|
||||||
|
null))
|
||||||
|
|
||||||
(method learnFrequencies [:String str]
|
(method learnFrequencies [:String str]
|
||||||
(let [chars (str.split "")]
|
(let [chars (str.split "")]
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
(doFor [following c] (pairs chars)
|
(doFor [following c] (pairs chars)
|
||||||
(incFrequency charFrequencies c following)))
|
(incFrequency charFrequencies c following)))
|
||||||
// TODO learn word frequencies
|
// TODO learn word frequencies
|
||||||
|
null
|
||||||
)))
|
)))
|
||||||
|
|
||||||
(prop :FlxRandom r (new FlxRandom))
|
(prop :FlxRandom r (new FlxRandom))
|
||||||
|
Reference in New Issue
Block a user