|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcolibri.test.test13.Test13a
public class Test13a
This test shows how to use the Textual CBR extension in a Restaurant recommender. See the jcolibri.extensions.textual.IE package documentation for
details about this extension. This example uses the OpenNLP implementation.
It uses a custum connector (RestaurantConnector) and similarity functions (AverageMultipleTextValues and TokensContained).
The connector loads cases from a normal txt file and the similarity functions work with the information extracted by the textual CBR methods.
These methods extract information from text and store it in the other attributes of the description. That information is stored as a string with
several values separated with white spaces, so specific similarity measures are requiered to compare those attributes.
See their javadoc for more information.
To compare the texts it uses a textual similarity function from the jcolibri.method.retrieve.NNretrieval.similarity.local.textual package.
Test13b uses the Lucene similarity function instead that one.
AverageMultipleTextValues
,
TokensContained
,
RestaurantsConnector
,
jcolibri.extensions.textual.IE
Constructor Summary | |
---|---|
Test13a()
|
Method Summary | |
---|---|
void |
configure()
Configures the application: case base, connectors, etc. |
void |
cycle(CBRQuery query)
Executes a CBR cycle with the given query. |
static void |
main(java.lang.String[] args)
|
void |
postCycle()
Runs the code to shutdown the application. |
CBRCaseBase |
preCycle()
Runs the precyle where typically cases are read and organized into a case base. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Test13a()
Method Detail |
---|
public void configure() throws ExecutionException
StandardCBRApplication
configure
in interface StandardCBRApplication
ExecutionException
public CBRCaseBase preCycle() throws ExecutionException
StandardCBRApplication
preCycle
in interface StandardCBRApplication
ExecutionException
public void cycle(CBRQuery query) throws ExecutionException
StandardCBRApplication
cycle
in interface StandardCBRApplication
ExecutionException
public void postCycle() throws ExecutionException
StandardCBRApplication
postCycle
in interface StandardCBRApplication
ExecutionException
public static void main(java.lang.String[] args)
|
GAIA - Group for Artificial Intelligence Applications http://gaia.fdi.ucm.es |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |