Author: rwesten
Date: Tue Nov 27 16:24:38 2012
New Revision: 1414249
URL: http://svn.apache.org/viewvc?rev=1414249&view=rev
Log:
STANBOL-819, STANBOL-740: The EntityLinker now extends Queries also outside of
Chunks. Tests have shown that this improves results. The old behaviour can be
reactivated by a boolean switch. If further tests show that both options are
useful depending on the domain, than one can make this also configureable
Modified:
stanbol/trunk/enhancer/engines/entitylinking/src/main/java/org/apache/stanbol/enhancer/engines/entitylinking/impl/EntityLinker.java
Modified:
stanbol/trunk/enhancer/engines/entitylinking/src/main/java/org/apache/stanbol/enhancer/engines/entitylinking/impl/EntityLinker.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/engines/entitylinking/src/main/java/org/apache/stanbol/enhancer/engines/entitylinking/impl/EntityLinker.java?rev=1414249&r1=1414248&r2=1414249&view=diff
==============================================================================
---
stanbol/trunk/enhancer/engines/entitylinking/src/main/java/org/apache/stanbol/enhancer/engines/entitylinking/impl/EntityLinker.java
(original)
+++
stanbol/trunk/enhancer/engines/entitylinking/src/main/java/org/apache/stanbol/enhancer/engines/entitylinking/impl/EntityLinker.java
Tue Nov 27 16:24:38 2012
@@ -103,8 +103,13 @@ public class EntityLinker {
searchStrings.add(token.getTokenText());
//Determine the range we are allowed to search for tokens
final int minIncludeIndex;
- int maxIndcludeIndex;
- if(token.inChunk != null &&
!textProcessingConfig.isIgnoreChunks()){
+ final int maxIndcludeIndex;
+ //NOTE: testing has shown that using Chunks to restrict search for
+ // additional matchable tokens does have an negative impact on
+ // recall. Because of that this restriction is for now
deactivated
+ boolean restrirctContextByChunks = false; //TODO: maybe make
configurable
+ if(token.inChunk != null && !textProcessingConfig.isIgnoreChunks()
&&
+ restrirctContextByChunks){
minIncludeIndex = Math.max(
state.getConsumedIndex()+1,
token.inChunk.startToken);