|
This page last changed on Sep 29, 2007 by amitku.
Overview
Featurelens application consists of
- ruby server that takes a relational database location and a port number. It listens for requests from the client.
- Open Laszlo client, that sends requests to the ruby server and listens for XML message responses.
The ruby server talks with
- Lucene indices
- Relational database
Ingestion process consists of following steps:
- Create a new database for the collection, follow the convention featurelens_collectionname_feature.
- use org.monkproject.preprocess.featurelens.CreateFeatureLensCollectionAndChunkTables program to create the chunk and collection tables in the database. Modify the rdbms.properties file to point to the correct database before running the application.
- Run sentimentality-featurelens.itn (checked into the monk-preprocess module in the monk svn) locally on a machine that has access to the lucene indices, you can run this itinerary in a batch mode on the server in case you do not have access to the Lucene indices. ALG/NCSA folks can help with that. This step will populate the patterns table. Use proper parameters for the Input: CollectionName/ChunkType, ChunkIds and Feature input modules.
- Modify the import_filter_analyze.rb, change the main batch as below and run the script. This will create the metrics tables.
$dbh = DBI.connect("DBI:Mysql:featurelens_sentimentality_twograms:localhost", "$user", "$password")
begin
col_id= ARGV[0]
#build index
puts "build index"
build_index(col_id)
#analyze
puts "compute metrics across section"
computeMetrics(col_id)
#compute section metrics for words
puts "compute metrics inside section"
computeMetricsSection(col_id)
#update support
puts "update support"
updateSupport(col_id)
#delete index
FileUtils::remove_entry_secure("indices/text" + col_id.to_s, true)
FileUtils::remove_entry_secure("indices/patterns" + col_id.to_s, true)
#rebuild index
puts "rebuild index"
build_index(col_id)
#optimize index
puts "optimize index"
optimize(col_id)
puts "That's it buddy ..."
end
Modify the server:
Change the port number and database location in the server.rb file
dbh = DBI.connect("DBI:Mysql:featurelens_sentimentality_twograms:localhost", "$user", "$password")
server = WEBrick::HTTPServer.new(:Port => $portnum)
Modify the Openlaszlo source code _ settingsWindow.lzx_ file:
<attribute name="backendURL" type="string" value="http:/>^M
|