示例#1
0
def is_good(dispute):
    keywords, claim, matchwords = dispute
    claimwords = set(tokenize(claim.lower()))
    claimkeywords = claimwords - okwords
    textwords = set([word.lower() for word in matchwords])
    claim_not_text = claimkeywords - textwords
    return len(claim_not_text) == 0
示例#2
0
def is_good(dispute):
	keywords,claim,matchwords = dispute
	claimwords = set(tokenize(claim.lower()))
	claimkeywords = claimwords - okwords
	textwords = set([word.lower() for word in matchwords])
	claim_not_text = claimkeywords - textwords
	return len(claim_not_text) == 0
示例#3
0
def add_shared_props(item):
	item['matchwords'] = get_trimmed_match(item)	
	item['trimmedmatch'] = " ".join(item['matchwords'])			
	item['claimwords'] = tokenize(item['claimtext'])
示例#4
0
def add_shared_props(item):
    item['matchwords'] = get_trimmed_match(item)
    item['trimmedmatch'] = " ".join(item['matchwords'])
    item['claimwords'] = tokenize(item['claimtext'])