Class Index | File Index

Classes


Class fullproof.TextInjector


Defined in: fullproof-all-large.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
fullproof.TextInjector(index, analyzer)
A TextInjector associates an index and an analyzer to provide an object able to inject texts.
Method Summary
Method Attributes Method Name and Description
 
inject(text, value, callback)
Inject a text and associates each of the word it composed with the provided value.
 
injectBulk(texArray, valueArray, callback, progressCallback)
Bulk-inject an array of text and an array of values.
Class Detail
fullproof.TextInjector(index, analyzer)
A TextInjector associates an index and an analyzer to provide an object able to inject texts.
Parameters:
index
the index to use when injecting
analyzer
the analyzer to use to parse and normalize the text
Method Detail
inject(text, value, callback)
Inject a text and associates each of the word it composed with the provided value.
Parameters:
text
some text to inject in the index
value
the value associated to each word from the text
callback
a function to call when the injection is complete

injectBulk(texArray, valueArray, callback, progressCallback)
Bulk-inject an array of text and an array of values. The text injected is associated to the value of the same index from the valueArray array. An optional progress function is called at regular interval to provide a way for the caller to give user feedback on the process.
Parameters:
texArray
an array of text
valueArray
an array of values. The length of valueArray must equal the length of textArray.
callback
a function to call when the injection is complete
progressCallback
a function called with progress indication. A numeric argument is provided to the function, which ranges from 0 to 1 (0 meaning not done, 1 meaning complete). Note that due to the floating nature of numeric values in javascript, you should not rely on receiving a 1, rather use the callback function parameter, which will be always called on completion of the injection.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Sep 18 2012 20:18:58 GMT+0200 (CEST)