work around withMutProperties bug

This commit is contained in:
2023-09-08 10:16:17 -06:00
parent a7d58ad2f6
commit 07230c0746

View File

@@ -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))