SearchEngineWordKeyFinder.java from Tea Stats at Krugle
Show SearchEngineWordKeyFinder.java syntax highlighted
/*
* This file is distributed under the GPL v2 as part of teastats site statistics package
* http://teastats.sourceforge.net
*/
package net.time4tea.webstats.analyser.extractor.key;
import net.time4tea.webstats.record.Record;
/**
* Originally richja Apr 30, 2006
*/
public class SearchEngineWordKeyFinder implements KeyFinder {
public String getKey(Record record) {
String string = record.getAttribute("searchterm").getValue().toString();
String[] strings = string.split("\\s+");
for (int i = 0; i < strings.length; i++) {
return strings[i];
}
return null;
}
}
See more files for this project here