No valid mentions?
Opened this issue · 1 comments
maged commented
In this file: https://github.com/CPROD/cprod-baselines/blob/master/src/baseline/filter/BrandnameFilter.java
Am I missing something, or is there never a valid mention? Should the last 'return false', be a 'return true'?
public boolean isValidMention(String[] text, int startIndex, int endIndex) {
int noBrands = 0;
for(int i=startIndex; i<=endIndex; i++) {
if(brandnames.contains(text[i]))
noBrands++;
}
//It must not contain two or more different brand names
if(noBrands>1)
return false;
// If 1-token long then it must not be a brand
if(startIndex==endIndex && noBrands==1)
return false;
return false;
}
gmelli commented
It looks like you are right. We will have a closer look in the few days and make required changes..