Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download web_app/src/utils/companySearchTerm.ts from CommunityOne/open-navigator: direct link, hf CLI and curl.
- Browser
- Download file 524 Bytes
-
https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/utils/companySearchTerm.ts
- Command line
-
hf download hf://spaces/CommunityOne/open-navigator/web_app/src/utils/companySearchTerm.ts
-
curl -L -o companySearchTerm.ts https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/utils/companySearchTerm.ts
524 Bytes
| /** | |
| * The search term behind a company's meeting count (#1043): the name actually said in its newest quote (the text the | |
| * server marked with <mark>), so "5 meetings" for Expedia Group searches "VRBO" rather than its first alias "HomeAway", | |
| * which no meeting says. Without a quote, the company's own name. | |
| */ | |
| export function companySearchTerm(companyName: string, evidence?: string | null): string { | |
| const m = /<mark>([^<]+)<\/mark>/i.exec(evidence ?? '') | |
| const said = m?.[1]?.trim() | |
| return said || companyName | |
| } | |