[hive-mrc] r583 committed - Changed MauiTopicExtractor to write URI to keyfile and SKOSTagger to s...

0 views
Skip to first unread message

hive...@googlecode.com

unread,
Dec 16, 2011, 4:54:10 PM12/16/11
to hive-c...@googlegroups.com
Revision: 583
Author: craig....@unc.edu
Date: Fri Dec 16 13:50:15 2011
Log: Changed MauiTopicExtractor to write URI to keyfile and SKOSTagger
to search by URI instead of keyword.
http://code.google.com/p/hive-mrc/source/detail?r=583

Modified:

/branches/hive-gwt-upgrade/hive-core/src/edu/unc/ils/mrc/hive/api/impl/elmo/SKOSTaggerImpl.java

=======================================
---
/branches/hive-gwt-upgrade/hive-core/src/edu/unc/ils/mrc/hive/api/impl/elmo/SKOSTaggerImpl.java
Thu Nov 10 15:12:28 2011
+++
/branches/hive-gwt-upgrade/hive-core/src/edu/unc/ils/mrc/hive/api/impl/elmo/SKOSTaggerImpl.java
Fri Dec 16 13:50:15 2011
@@ -330,7 +330,15 @@
String line = br.readLine();
while (line != null) {
String[] elements = line.split("\t");
- String concept = elements[1];
+ String uri = elements[1];
+ String[] uri_elements = uri.split("#");
+ SKOSConcept concept = searcher.searchConceptByURI(
+ uri_elements[0] + "#", uri_elements[1]);
+ concept.setScore(new Double(elements[2]));
+ result.add(concept);
+ line = br.readLine();
+
+ /*
List<SKOSConcept> concepts = searcher
.searchConceptByKeyword(concept);
if (concepts.size() > 0) {
@@ -338,7 +346,7 @@
result.add(concepts.get(0));
//logger.debug("concept QName = " +
concepts.get(0).getQName());
}
- line = br.readLine();
+ */
}
br.close();
isr.close();

Reply all
Reply to author
Forward
0 new messages