Result
- class Result(url=None, title=None, description=None, netloc=None, published=None, visited=None, author=None, content=None, best_chunk=None, language=None, similarity=None, url_hash=None, brand_safety=None, continent=None, region=None, country=None, sector=None, industry_group=None, industry=None, sub_industry=None, iab_tier_1=None, iab_tier_2=None, iab_tier_3=None, iab_tier_4=None, semantics=None, extra=<factory>)
Bases:
objectOne losslessly represented Search result.
Attributes
authorcontentdescriptionlanguagenetlocpublishedsimilaritytitleurlurl_hashvisitedbest_chunkbrand_safetycontinentregioncountrysectorindustry_groupindustrysub_industryiab_tier_1iab_tier_2iab_tier_3iab_tier_4semanticsextraMethods
from_dict(data)Create a result without discarding unknown response fields.
sentiment(client)Score this result's content with the configured LLM.
similar(client[, sql_filter, n_results, ...])Find results similar to this result while excluding the source document.
to_dict()Convert the result to its lossless dictionary representation.
scrape_url(client)Scrape the URL associated with this result.
- Parameters:
url (str | None)
title (str | None)
description (str | None)
netloc (str | None)
published (str | None)
visited (str | None)
author (str | None)
content (str | None)
best_chunk (str | None)
language (str | None)
similarity (float | None)
url_hash (str | None)
brand_safety (str | None)
continent (str | None)
region (str | None)
country (str | None)
sector (str | None)
industry_group (str | None)
industry (str | None)
sub_industry (str | None)
iab_tier_1 (str | None)
iab_tier_2 (str | None)
iab_tier_3 (str | None)
iab_tier_4 (str | None)
semantics (Dict[str, Any] | None)
extra (Dict[str, Any])
- present_fields: Set[str]
- scrape_url(client)
Scrape the URL associated with this result.
- Parameters:
client (Any) – Configured NOSIBLE client.
self (Result)
- Returns:
Scraped web-page data.
- Return type:
- sentiment(client)
Score this result’s content with the configured LLM.
- Parameters:
client (Any) – Configured NOSIBLE client with an LLM API key.
self (Result)
- Returns:
Sentiment score from negative one to positive one.
- Return type:
float
- similar(client, sql_filter=None, n_results=100, n_probes=30, n_contextify=128, algorithm='hybrid-3', publish_start=None, publish_end=None, visited_start=None, visited_end=None, certain=None, include_netlocs=None, exclude_netlocs=None, include_companies=None, exclude_companies=None, include_docs=None, exclude_docs=None, brand_safety=None, language=None, continent=None, region=None, country=None, sector=None, industry_group=None, industry=None, sub_industry=None, iab_tier_1=None, iab_tier_2=None, iab_tier_3=None, iab_tier_4=None, instruction=None, *args, **kwargs)
Find results similar to this result while excluding the source document.
- Parameters:
client (Any) – Configured NOSIBLE client.
sql_filter (str | None) – Optional SQL filter.
n_results (int) – Maximum result count.
n_probes (int) – Number of search probes.
n_contextify (int) – Context size per result.
algorithm (str) – Retrieval algorithm.
publish_start (str | None) – Earliest publication date.
publish_end (str | None) – Latest publication date.
visited_start (str | None) – Earliest NOSIBLE visit date.
visited_end (str | None) – Latest NOSIBLE visit date.
certain (bool | None) – Whether dates must be certain.
include_netlocs (List[str] | None) – Domains to include.
exclude_netlocs (List[str] | None) – Domains to exclude.
include_companies (List[str] | None) – Company identifiers to include.
exclude_companies (List[str] | None) – Company identifiers to exclude.
include_docs (List[str] | None) – Document hashes to include.
exclude_docs (List[str] | None) – Document hashes to exclude.
brand_safety (str | None) – Brand-safety filter.
language (str | None) – ISO language filter.
continent (str | None) – Continent filter.
region (str | None) – Region filter.
country (str | None) – Country filter.
sector (str | None) – GICS sector filter.
industry_group (str | None) – GICS industry-group filter.
industry (str | None) – GICS industry filter.
sub_industry (str | None) – GICS sub-industry filter.
iab_tier_1 (str | None) – IAB tier-one filter.
iab_tier_2 (str | None) – IAB tier-two filter.
iab_tier_3 (str | None) – IAB tier-three filter.
iab_tier_4 (str | None) – IAB tier-four filter.
instruction (str | None) – Additional retrieval instruction.
args (Any) – Ignored legacy positional arguments.
kwargs (Any) – Deprecated legacy keyword arguments.
self (Result)
- Returns:
Similar search results.
- Return type: