@bicharts/shape-core 0.6.129 → 0.6.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1 -1
- package/dist/types/geoPointRoles.d.ts +20 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -10,9 +10,29 @@ export type PointBind = {
|
|
|
10
10
|
* another slot — see the "CA" note above. */
|
|
11
11
|
country?: string;
|
|
12
12
|
};
|
|
13
|
+
/** Why a role was refused or backfilled - a closed list a host words in the reader's language. */
|
|
14
|
+
export type PointRoleReason = "low-match" | "short-digits" | "ambiguous-ca" | "country-values" | "replaced" | "no-coordinate-pair" | "one-country" | "not-country" | "matched";
|
|
15
|
+
/**
|
|
16
|
+
* One role decision as DATA, beside the English sentence in `refused`/`backfilled` (same order).
|
|
17
|
+
* The sentences were written for a person and read only in English; a host that shows them to a
|
|
18
|
+
* reader words these facts in the reader's language instead, and no caller parses prose.
|
|
19
|
+
*/
|
|
20
|
+
export type PointRoleFact = {
|
|
21
|
+
kind: "refused" | "backfilled";
|
|
22
|
+
role: "city" | "state" | "zip" | "country" | "lat/lon";
|
|
23
|
+
/** The column the role named ("Lat/Lon" pairs read "latColumn/lonColumn"). */
|
|
24
|
+
column: string;
|
|
25
|
+
reason: PointRoleReason;
|
|
26
|
+
/** The share of values that read as the role, when the decision measured one. */
|
|
27
|
+
pct?: number;
|
|
28
|
+
/** For "replaced": the column used instead. */
|
|
29
|
+
replacement?: string;
|
|
30
|
+
};
|
|
13
31
|
export type PointRoleResolution = {
|
|
14
32
|
/** The binding to geocode with: hint, minus anything refused, plus anything backfilled. */
|
|
15
33
|
bind: PointBind | null;
|
|
34
|
+
/** Every refusal and backfill as data, in the order of `refused` then `backfilled`. */
|
|
35
|
+
facts: PointRoleFact[];
|
|
16
36
|
/** Roles the hint omitted that were resolved from the data ("state=StateCode"). */
|
|
17
37
|
backfilled: string[];
|
|
18
38
|
/** Roles the hint named that were REFUSED, with why ("state=Country (country column)"). */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type { Admin1ColumnSignals, ProvinceIsoColumn, ProvinceSource } from "./a
|
|
|
29
29
|
export { resolveGeoPoint, buildGeoPointColumns, isGeoPointAmbiguity, resolveAdmin1, zipToPrefix3, zipPrefixCandidates, normalizeZip5, normalizePlaceName, cityMatchPct, normalizeCountry, cityTagsFor, registerCityTable, isCityTableLoaded, } from "./geoPoint";
|
|
30
30
|
export type { GeoPointPrecision, GeoPointResult, GeoPointColumns, GeoPointAmbiguity, GeoMapKind } from "./geoPoint";
|
|
31
31
|
export { resolvePointRoles, looksLikeCountryColumn, admin1MatchPct, zipMatchPct, } from "./geoPointRoles";
|
|
32
|
-
export type { PointBind, PointRoleResolution } from "./geoPointRoles";
|
|
32
|
+
export type { PointBind, PointRoleResolution, PointRoleFact, PointRoleReason } from "./geoPointRoles";
|
|
33
33
|
export { monthLookupFor, normalizeMonthKey } from "./monthNames";
|
|
34
34
|
export { looseNameKey, isUsableLooseKey, LOOSE_KEY_MIN_LENGTH, LooseIndex } from "./knownNameKey";
|
|
35
35
|
export { STR, SIMPLE_STRING_HASH, GET_RANDOM, isDeterministicRefusal, nameWords, DEFAULT_TEMPERATURE } from "./util";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/shape-core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.131",
|
|
4
4
|
"description": "Host-agnostic data-shape profiler: ingest a dataset's rows through IValueCollection.addRow and read back the measured shape as an LLMColumnWithValue[] payload — types, cardinality, temporal/ordinal detection, geographic region and point resolution, cross-column signals. MEASUREMENT only: the policy that decides what a measured shape means for chart selection lives server-side.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|