Permalink
Browse files

Missed a 'prompt' misspelling

  • Loading branch information...
DanielRapp DanielRapp
DanielRapp authored and DanielRapp committed Jan 12, 2012
1 parent 32c76c1 commit 37540d0c6557b96d2f35f09142992a0e542c86d6
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/classifier/knn.js
  2. +1 −1 package.json
View
@@ -19,23 +19,23 @@ var getDistance = function(doc1, doc2, numWordsInNgram) {
};
exports.isTwss = function(options) {
- var prompt = docUtils.cleanDocument(options.prompt)
+ var prompt = docUtils.cleanDocument(options.prompt)
, trainingData = options.trainingData || {}
, numNeighbours = options.numNeighbours || 5
, numWordsInNgram = options.numWordsInNgram || 1
- , prompts = [];
+ , prompts = [];
// TODO: Optimize by creating the neighbourhood as the distances are calculated
for (var trainingType in trainingData) {
var data = trainingData[trainingType];
for (var i = 0; i < data.length; i++) {
- var trainingPromt = data[i];
+ var trainingPrompt = data[i];
prompts.push({
"distance": getDistance( prompt, trainingPrompt, numWordsInNgram ),
"type": trainingType,
- "prompt": trainingPrompt
+ "prompt": trainingPrompt
});
}
}
View
@@ -1,6 +1,6 @@
{
"name": "twss"
- , "version": "0.1.3"
+ , "version": "0.1.4"
, "description": "That's what she said classifier"
, "keywords": ["machine learning", "classifier", "twss", "ai"]
, "author": "Daniel Rapp <danielrappt@gmail.com>"

0 comments on commit 37540d0

Please sign in to comment.