SnippetText¶
- class semanticscholar.Snippet.SnippetText(data: dict)¶
Text snippet data returned by the snippet search endpoint.
- keys() list¶
Returns a list of all keys in the API response data.
- Return type:
list
- property annotations: dict¶
Annotations (sentences, refMentions).
- Type:
dict
- property raw_data: dict¶
The API response data in its original JSON structure, represented as a dict.
- Type:
dict
- property section: str¶
Section of the paper where the snippet is located (only for body snippets).
- Type:
str
- property snippet_kind: str¶
Where the snippet is located: title, abstract, or body.
- Type:
str
- property snippet_offset: dict¶
Location of the snippet within the paper (start, end).
- Type:
dict
- property text: str¶
The direct quote or snippet text from the paper.
- Type:
str