context_texts#
- scikitplot.corpus.context_texts(contexts, *, label='contexts')[source]#
Return the texts of retrieved contexts, in order.
- Parameters:
- contextsiterable
Strings, search hits (
hit.doc.text), documents (doc.text) or mappings with a"text"key. A singlestris refused: it would otherwise be read one character at a time.- labelstr, default=”contexts”
Name used in error messages.
- Returns:
- tuple of str
- Raises:
- TypeError
For a
str, a non-iterable, or an item without text.
- Parameters:
- Return type:
Examples
>>> context_texts(["Paris is in France.", {"text": "Lyon too."}]) ('Paris is in France.', 'Lyon too.')