Return true if at least one of the values is not null/empty.

@param keyword the sentiment keyword
@param score the sentiment score

@return true if at least one of the values is not null/empty
173665
private boolean isValidKeyword(final String keyword, final Double score) {
    return !StringUtils.isBlank(keyword)
           || score != null;
  }
212787
public static boolean contains(String list, String keyword) {
        int idx;
        int colon;
        String quality;

        idx = list.indexOf(keyword);
        if (idx == -1) {
            return false;
        }
        idx += keyword.length();
        colon = list.indexOf(",", idx);
        if (colon == -1) {
            colon = list.length();
        }
        quality = list.substring(idx, colon);
        idx = quality.indexOf('=');
        if (idx == -1) {
            return true;
        }
        return !"0".equals(quality.substring(idx + 1).trim());
    }
707202
@SuppressWarnings("rawtypes")
    @Override
    public boolean getIsEmpty() {

        if (m_object == null) {
            // this is the case for non existing values
            return true;
        } else if (m_object instanceof String) {
            // return values for String
            return CmsStringUtil.isEmpty((String)m_object);
        } else if (m_object instanceof Collection) {
            // if a collection has any entries it is not emtpy
            return !((Collection)m_object).isEmpty();
        } else {
            // assume all other non-null objects are not empty
            return false;
        }
    }
1028121
private @CheckForNull NullnessAnnotation toNullnessAnnotation(@CheckForNull TypeQualifierAnnotation tqa) {
        if (tqa == null || tqa == TypeQualifierAnnotation.OVERRIDES_BUT_NO_ANNOTATION) {
            return null;
        }
        if (tqa.when == null) {
            new NullPointerException("TGA value with null when field").printStackTrace();
            return null;
        }



        switch (tqa.when) {
        case ALWAYS:
            return NullnessAnnotation.NONNULL;
        case MAYBE:
            return NullnessAnnotation.CHECK_FOR_NULL;
        case NEVER:
            return NullnessAnnotation.CHECK_FOR_NULL;
        case UNKNOWN:
            return NullnessAnnotation.UNKNOWN_NULLNESS;
        }

        throw new IllegalStateException();
    }
1335117
def hasScoreBetterThan(self, score):
        
        # Note: Do not assume that HSPs in an alignment are sorted in
        # decreasing order (as they are in BLAST output). If we could
        # assume that, we could just check the first HSP in each alignment.
        for hsp in self.hsps():
            if hsp.betterThan(score):
                return True
        return False
1366432
private boolean match(String keyword, int fromIndex) {

        int match = 0;

        // 查找非空白字符。
        for (int index = fromIndex; index < length; index++) {

            char ch = pattern.charAt(index);

            if (!Character.isWhitespace(ch)) {
                match = index;
                break;
            }
        }

        // 匹配关键字内容。
        for (int index = 0; index < keyword.length(); index++) {

            char ch = pattern.charAt(match);

            if (ch != keyword.charAt(index)) {
                // 与关键字不匹配
                return false;
            }

            match++;
        }

        // 修改当前位置
        position = match;

        return true;
    }
446959
public BooleanExpression isEmpty() {
        if (empty == null) {
            empty = Expressions.booleanOperation(SpatialOps.IS_EMPTY, mixin);
        }
        return empty;
    }
998271
protected boolean hasPlusMinusOneValues(StatementGroup statementGroup) {
		if (statementGroup == null) {
			return false;
		}
		for (Statement s : statementGroup) {
			QuantityValue qv = (QuantityValue) s.getValue();
			if (qv != null && isPlusMinusOneValue(qv)) {
				return true;
			}
		}
		return false;
	}
594651
public static boolean isEmpty(String aString)  {
    	boolean result = true;
    	if (aString != null && aString.trim().length()>0) { 
    		if (!aString.trim().toUpperCase().equals("NULL")) { 
    		   result = false;
    		}
    	}
    	return result;
    }
372305
final public double score(StringWrapper s,StringWrapper t) 
	{
		BagOfTokens sBag = (BagOfTokens)s;
		BagOfTokens tBag = (BagOfTokens)t;
		double sum = 0;
		for (Iterator i = sBag.tokenIterator(); i.hasNext(); ) {
	    Token tok = (Token)i.next();
	    if (tBag.contains(tok)) {
				double ps = sBag.getWeight(tok);
				double pt = tBag.getWeight(tok);
				sum -= h(ps + pt) - h(ps) - h(pt);
			}
		}
		return 0.5*sum/Math.log(2);
	}
399048
public boolean matchKeyword(String keyword) {
		return tok.ttype == StreamTokenizer.TT_WORD && tok.sval.equals(keyword)
				&& keywords.contains(tok.sval);
	}
655523
public static boolean isNullOrEmptyOrQuestionMark(final String string) {
        if (string == null || string.length() == 0 || "?".equals(string)) {
            return true;
        }
        return false;
    }
871575
public boolean isNull(String key){
		LazyNode token=getOptionalFieldToken(key);
		if(token==null)return true;
		if(token.type==LazyNode.VALUE_NULL)return true;
		return false;
	}
1302408
private boolean isValidNamedEntity(final Double score, final String text) {
    return !StringUtils.isBlank(text)
           || score != null;
  }
557679
public boolean hasStopWord(HString text) {
    if (text == null) {
      return true;
    } else if (text.isInstance(Types.TOKEN)) {
      return isTokenStopWord(Cast.as(text));
    }
    return text.tokens().stream().anyMatch(this::isTokenStopWord);
  }
14242
public static boolean isValid(String token)
    {
        if (token == null || token.length() == 0)
        {
            return false;
        }

        int len = token.length();

        for (int i = 0; i < len; ++i)
        {
            if (isSeparator(token.charAt(i)))
            {
                return false;
            }
        }

        return true;
    }
382166
@Override
    protected double scoreImpl(List<Word> words1, List<Word> words2){
        //文本1
        StringBuilder text1 = new StringBuilder();
        words1.forEach(word -> text1.append(word.getText()));
        //文本2
        StringBuilder text2 = new StringBuilder();
        words2.forEach(word -> text2.append(word.getText()));
        //计算文本1和文本2的Jaro距离
        //Jaro距离也就是相似度分值
        double score = jaroDistance(text1.toString(), text2.toString());
        if(LOGGER.isDebugEnabled()){
            LOGGER.debug("文本1："+text1.toString());
            LOGGER.debug("文本2："+text2.toString());
            LOGGER.debug("文本1和文本2的相似度分值："+score);
        }
        return score;
    }