    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++;
        }
        if(noBrands>1)
            return false;
        if(startIndex==endIndex && noBrands==1)
            return false;
        return false;
    }

    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++;
        }
        if(noBrands>1)
            return false;
        if(startIndex==endIndex && noBrands==1)
            return false;
        return true;
    }
