Skip to content

quotes_found

quotes_found(text, quotes)

Whether each quote is in the text, word for word.

White space, case, curly and straight quotes, dashes and a quote's own surrounding quotation marks and final punctuation do not count; any other difference does (a changed word, a paraphrase, an invented sentence). Deterministic, and costs nothing.

Parameters

Name Type Description Default
text str The source the quotes should come from. required
quotes str or list of str One quote, or several. required

Returns

Name Type Description
bool or list of bool For one quote, whether it is found; for a list, one answer per quote.

Examples

import functai
from functai import *
source = "The parcel left Leeds on Monday. It was delayed by snow."
functai.quotes_found(source, ["“It was delayed by snow”", "It was lost"])
[True, False]