Parse and geocode result schema
This page describes the published 11.0.0 component vocabularyvocabularyThe fixed set of tokens a tokenizer can produce. Mailwoman's SentencePiece vocabulary is tens of thousands of subword pieces, with byte fallback for anything outside it. and the result types used by the parser and geocoder. A parseaddress parsingThe process of decomposing a free-text postal address string into structured components — house number, street name, locality, region, postcode, and country — so a geocoder can resolve them to coordinates. returns a PipelineResult with an AddressTree; a geocode returns a separate GeocodeResult. Fields below are grouped by the interface that owns them.
Component tags
ComponentTag is the union of the 26 strings exported as COMPONENT_TAGS by @mailwoman/codex/component@11.0.0. A tag identifies a spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.'s role. The schema lists every possible tag, and a modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.''s card lists the tags that modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' supports. The published @mailwoman/neural-weights-en-us@11.0.0 card identifies its modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' as version 10.8.0 and lists 16 supported tags. The final column describes that modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' headattention headOne of several parallel attention computations in a layer, each free to focus on a different kind of relationship between tokens. Their outputs are concatenated — 'multi-head attention'. Mailwoman uses 4 heads.. Other localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for. packages and rule-based stagesstageOne of the dataflow stages in the runtime pipeline (normalize, locale check, kind classify, phrase group, token classify, sequence correct, reconcile, resolve). Distinct from tier (model vocabulary) and phase (plan milestone). have their own capabilities.
| Tag | Component | en-US modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' headattention headOne of several parallel attention computations in a layer, each free to focus on a different kind of relationship between tokens. Their outputs are concatenated — 'multi-head attention'. Mailwoman uses 4 heads. |
|---|---|---|
country | CountrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. name or code | Yes |
region | First-level administrative regionregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality. | Yes |
locality | CitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. or other main settlement | Yes |
dependent_locality | Settlement or neighborhood below a localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. | Yes |
postcode | PostcodepostcodeThe country-specific postcode (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. | Yes |
subregion | Administrative regionregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality. below region | Yes |
house_number | StreetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. address number | Yes |
street | Base streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. name | Yes |
street_prefix | StreetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. type or directional prefix | Yes |
street_prefix_particle | Particle within a street prefixstreet affixA modifier on a street name indicating type or direction — Street, Avenue, rue, Calle, N, East. Mailwoman tags these as street_prefix / street_suffix, recognized via a morphology FST. | No |
street_suffix | StreetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. type or directional suffix | Yes |
intersection_a | First streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. of an intersectionintersectionAn address that names a location by two crossing streets ('5th & Main') rather than a number and street. Mailwoman tags the two streets as intersection_a and intersection_b — a negative-space format that starved the early model. | Yes |
intersection_b | Second streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. of an intersectionintersectionAn address that names a location by two crossing streets ('5th & Main') rather than a number and street. Mailwoman tags the two streets as intersection_a and intersection_b — a negative-space format that starved the early model. | Yes |
unit | Apartment, suite, or other unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. | Yes |
venue | Place or building used as a destination | Yes |
attention | Addressee or attentionattentionThe core mechanism inside a transformer encoder. Each token's representation is updated by looking at every other token, with learned weights deciding how much each one matters. line | No |
po_box | Post office boxPO boxA numbered mailbox at a post office used as a delivery address instead of a physical street location. Mailwoman tags it as the po_box component; structurally the same family as a subpremise. | Yes |
cedex | French CEDEXCEDEX (Courrier d'Entreprise à Distribution Exceptionnelle). A French postal routing for high-volume business mail: a CEDEX code delivers directly from a sorting center, bypassing the local post office. A common negative-space format Mailwoman must parse. routing detail | Yes |
prefecture | Prefecture in a localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for.-specific hierarchy | No |
municipality | MunicipalitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. in a localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for.-specific hierarchy | No |
district | District in a localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for.-specific hierarchy | No |
block | Block in a localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for.-specific hierarchy | No |
sub_block | Sub-block in a localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for.-specific hierarchy | No |
building_number | Building number within a localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for.-specific hierarchy | No |
building_name | Building name within a localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for.-specific hierarchy | No |
locality_unit | UnitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. settlement in a Chinese rural address | No |
BIO_LABELS contains O for text outside a component, plus B-<tag> for the beginning and I-<tag> for the continuation of each tag. Its 53 labelscomponent tagOne of the 25 labels in Mailwoman's address schema — street, locality, region, postcode, house_number, unit, po_box, country, venue, intersection, and others. Each parsed span carries exactly one component tag. comprise one O and two labelscomponent tagOne of the 25 labels in Mailwoman's address schema — street, locality, region, postcode, house_number, unit, po_box, country, venue, intersection, and others. Each parsed span carries exactly one component tag. for each of the 26 component tagscomponent tagOne of the 25 labels in Mailwoman's address schema — street, locality, region, postcode, house_number, unit, po_box, country, venue, intersection, and others. Each parsed span carries exactly one component tag.. The en-US model cardmodel cardA JSON metadata file (model-card.json) shipped with each weights bundle. It declares the model version, lineage, label set, required inference channels (anchor, gazetteer), calibration data, and training provenance. declares 33 labelscomponent tagOne of the 25 labels in Mailwoman's address schema — street, locality, region, postcode, house_number, unit, po_box, country, venue, intersection, and others. Each parsed span carries exactly one component tag.: one O and two labelscomponent tagOne of the 25 labels in Mailwoman's address schema — street, locality, region, postcode, house_number, unit, po_box, country, venue, intersection, and others. Each parsed span carries exactly one component tag. for each of its 16 supported tags.
Parse result
parse returns a PipelineResult. These are its top-level fields. The library API describes the call options.
| Field | Type | Meaning |
|---|---|---|
input | string | Input supplied to the parser. |
normalized | normalized input object | Text and normalization details used by the pipelinestaged pipelineMailwoman's runtime architecture: a sequence of pure-function stages (normalize → query-shape → locale-hint → kind-classifier → phrase-grouper → classifier → decoder) connected by typed handoffs. Each stage is published as its own npm package.. |
queryShape | query-shape object | Detected format matches, segmentssegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context., scripts, and tokentokenOne word or subword in the tokenized input. For the neural classifier, tokens come from SentencePiece (subword units); for the rule classifiers, tokens are whitespace- and punctuation-separated words. classes. A format match describes shape. It doesn't establish a countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head.. |
locale | LocaleHint | Chosen BCP-47 localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for., confidence, alternatives, and source. source is caller, environment, machine, detected, or ensemble. |
kind | QueryKindResult | Chosen query kindquery kindThe coarse category the kind classifier assigns to the whole input — postcode_only, locality_only, structured_address, intersection, po_box, landmark, or vague — used to route processing., confidence, alternatives, and optional advisories. |
phraseProposals | array | Phrase proposals, empty when no grouper ran or a fast path skipped it. |
tree | AddressTree | Labeled component tree. |
poiIntent | object or null | Point-of-interest intent result when that stagestageOne of the dataflow stages in the runtime pipeline (normalize, locale check, kind classify, phrase group, token classify, sequence correct, reconcile, resolve). Distinct from tier (model vocabulary) and phase (plan milestone). produced one. |
timing | object | StagestageOne of the dataflow stages in the runtime pipeline (normalize, locale check, kind classify, phrase group, token classify, sequence correct, reconcile, resolve). Distinct from tier (model vocabulary) and phase (plan milestone). timings for this run. |
faults | array | Caught stagestageOne of the dataflow stages in the runtime pipeline (normalize, locale check, kind classify, phrase group, token classify, sequence correct, reconcile, resolve). Distinct from tier (model vocabulary) and phase (plan milestone). failures in order. An empty array means no stagestageOne of the dataflow stages in the runtime pipeline (normalize, locale check, kind classify, phrase group, token classify, sequence correct, reconcile, resolve). Distinct from tier (model vocabulary) and phase (plan milestone). faulted. |
intentMarkers | array | Query-intent advisories. An empty array means none matched. |
path | fast-path, full, or poi | Pipelinestaged pipelineMailwoman's runtime architecture: a sequence of pure-function stages (normalize → query-shape → locale-hint → kind-classifier → phrase-grouper → classifier → decoder) connected by typed handoffs. Each stage is published as its own npm package. branch taken for this input. |
AddressTree.raw is the text whose offsets index the returned nodes. It can differ from PipelineResult.input after the classifier adjusts letter case, as the example in the first-parse tutorial shows. AddressTree.roots contains the top-level nodes. The tree also has optional system, country, and localeCountry fields.
AddressNode field | Type | Meaning |
|---|---|---|
tag | ComponentTag | Role of the spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.. |
value | string | Text assigned to the component. |
start, end | number | Start inclusive and end exclusive offsets into tree.raw. |
confidence | number | Returned node score. It isn't evidence that an address exists. |
children | AddressNode[] | Nested components. An empty array has no child nodes. |
source, sourceID | optional string or null | Node origin and an identifier within that origin, when recorded. |
lat, lon, placeID | optional number, number, string | Resolved place centroid and normalized place URI, when resolution supplied them. |
alternatives, interpretations | optional arrays | Runner-up places or secondary tags for this spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.. |
metadata, script | optional object or null, optional string | Diagnostic metadata and ISO 15924 script, when available. |
The half-open spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. [start, end) selects tree.raw.slice(start, end). In the published 11.0.0 example, the input apt 4b 350 5th ave new york ny 10118 yields tree.raw as Apt 4B 350 5TH Ave New York NY 10118. Its locality node has [19, 27) and value New York; slicing the returned tree.raw at those offsets returns New York.
Query kinds
QueryKindResult.kind is one of the following 12 values exported by QueryKindSchema in @mailwoman/core/pipeline@11.0.0:
| Kind | Input or requested operation |
|---|---|
postcode_only | PostcodepostcodeThe country-specific postcode (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. without a fuller address. |
locality_only | LocalitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. without a fuller address. |
structured_address | Address with streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. or other structured components. |
intersection | Two crossing streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. descriptions. |
po_box | Post office boxPO boxA numbered mailbox at a post office used as a delivery address instead of a physical street location. Mailwoman tags it as the po_box component; structurally the same family as a subpremise. query. |
landmark | Landmark query. |
poi_query | Point-of-interest query. |
vague | Input without enough address structure for a more specific kind. |
bare_toponym | Bare place nametoponymA proper name for a geographic place.. Resolution can report ambiguity. |
route_pair | Two place namestoponymA proper name for a geographic place.. The pipelinestaged pipelineMailwoman's runtime architecture: a sequence of pure-function stages (normalize → query-shape → locale-hint → kind-classifier → phrase-grouper → classifier → decoder) connected by typed handoffs. Each stage is published as its own npm package. reports readings without routing. |
near_me | Relative location query that needs the caller's position. |
poi_category | Point-of-interest category without a search anchor. |
Geocode result and provenance
GeocodeResult is a separate projected result. The following fields describe its coordinate, matched components, and evidence. A null coordinate means the result has no selected coordinate. A null coordinate_source means the result contains no source stamp for its selected coordinate.
The source stamp is copied from the matched address-point or interpolationinterpolationA geocoding technique that estimates a coordinate along a street segment based on the house number range. Used as the middle tier of Mailwoman's geocode cascade when exact address-point data is unavailable. row when that row has a nonempty source. Its release is null when the row has no release value. A landmark venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. answer can also carry its landmark source with a null release. Other tiers and a coordinate later moved away from the matched row have a null coordinate_source. The stamp identifies what the selected row recorded. It doesn't establish the original publisher of every transformed input or grant permission to use the data. The trust and evidence explanation separates these questions.
| Field | Type | Meaning |
|---|---|---|
input | string | Geocoded input. |
components | partial record from ComponentTag to string | One value per retained parsed tag. |
dropped_components | array or null | SpansspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. omitted by the one-value-per-tag projection, or null when none were dropped. |
unfollowed_components | array or null | Parsed components that the selected coordinate didn't follow. |
lat, lon | number or null | Returned coordinate when one was selected. |
resolution_tier | ResolutionTier | Mechanism that supplied the coordinate. The value starts as admin and changes only when a finer mechanism supplies the coordinate, so a result whose lat and lon are null can still report admin. |
epistemic_status | EpistemicStatus | Claim supported by the coordinate's evidence, independently of the tier. |
coordinate_source | object or null | The matched address-point or interpolationinterpolationA geocoding technique that estimates a coordinate along a street segment based on the house number range. Used as the middle tier of Mailwoman's geocode cascade when exact address-point data is unavailable. row's source and release when stamped. The published landmark venue branch can also set a source, with release: null. Other paths may return null. |
uncertainty_m | number or null | Reported uncertainty radius in meters, when available. |
hierarchy | array | Resolved administrative entries, most specific first. |
candidates | array | Places the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. weighed, grouped by parsed spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.: the primary spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.'s selected place first, then the places each resolved spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. passed over. See place candidates. |
derivation | object or null | Derivation projection when the caller provided a resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. trace sink. |
entity, rooftop | object or null | Matched point of interestpoint of interest (POI). A named place that is not strictly an address — landmark, transit stop, venue, amenity, or franchise. Mailwoman tags these as venue and resolves them through the gazetteer. or address-point row details when applicable. |
authoritative | object or null | Answer from a configured authoritative provider, when one was configured. |
Place candidates
Each candidates entry carries the parsed spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. it answers, in tag and value, and the place's gazetteergazetteerA geographical index that maps place names and postcodes to real-world coordinates. Mailwoman uses a custom-built Who's On First (WOF) SQLite database as its gazetteer — the 'atlas' half of the grammar/atlas architecture. placetype. Within a spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree., the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon.'s ranked runner-ups come first. The places a side probe returned and the places a later resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. pass replaced follow them. A place appears once, under the first spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. that weighed it, identified by placeID. Two places at the same coordinate, such as a citylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. and its coincident township, are both listed. A spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. lists at most 10 places, and the array holds at most 25.
A candidate's score ranks places within one spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.. It has no unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. across spansspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. or answers. A null score comes with scoreUnmeasured, which states why: population_unrecorded when the gazetteergazetteerA geographical index that maps place names and postcodes to real-world coordinates. Mailwoman uses a custom-built Who's On First (WOF) SQLite database as its gazetteer — the 'atlas' half of the grammar/atlas architecture. ranks by a population it doesn't record for that place, population_estimated when the score ranks a population estimated from the settlement that contains the place, and unrecorded when the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. recorded no score.
This result has no field for the selected database's content digest, complete candidate-to-source lineage, trainingtrainingThe process of adjusting a model's parameters so its predictions match labeled examples, by repeatedly measuring error and nudging the weights to reduce it. Distinct from inference, when the trained model is run on new input.-row attribution, source permission grants, or a cryptographic signature. A caller must record the installed artifact and request context separately if those details are needed for an audit. A null derivation means no resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. trace sink supplied events for that projection. The evidence review guide gives the operator steps.
The result also has nullable convenience fields for locality, region, postcode, house_number, street, venue, dependent_locality, unit, and countryCode. house_number can be present on a coarse tier. Only address_point and interpolated place the coordinate at the house. Other fields record query-intent markers, administrative coherencecoherenceThe property of a parse whose resolved places form a consistent geographic hierarchy — the resolved locality really does sit inside the resolved region., and resolution decisions. The GeocodeResultSchema source listed in the frontmatter defines the remaining fields.
resolution_tier | Coordinate mechanism |
|---|---|
address_point | Matched address-point row. |
interpolated | Number interpolated from a register row. |
street | StreetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels.-level result. |
postcode | PostcodepostcodeThe country-specific postcode (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one.-level result. |
admin | Administrative place result. |
venue | Point-of-interest result. |
plus_code | Plus-code result. |
epistemic_status | Claim supported by the evidence |
|---|---|
designated | An authority assigned the value. |
observed | An identified source recorded the value at a particular vintage. |
derived | A stated rule computed the value from observations. |
inferred | The value follows from constraints without a matched row. |
unresolved | The evidence supports no value claim. |
AddressNode.source describes where one parseaddress parsingThe process of decomposing a free-text postal address string into structured components — house number, street name, locality, region, postcode, and country — so a geocoder can resolve them to coordinates. or resolved-tree node came from. GeocodeResult.coordinate_source records the matched register row for an address point or interpolationinterpolationA geocoding technique that estimates a coordinate along a street segment based on the house number range. Used as the middle tier of Mailwoman's geocode cascade when exact address-point data is unavailable. when that row has a source stamp. The published landmark branch writes its landmark source to the same field. That branch was read from the published source, and no landmark geocode is recorded on this page. epistemic_status states the evidence claim for the selected coordinate.
Example: inspect the published vocabulary
The example needs Node.js ^24.22.3 || >=26.13.1 and an ECMAScript module project with "type": "module" in its package.json. Start by installing the required packages:
- npm
- Yarn
- pnpm
- Bun
npm install @mailwoman/codex @mailwoman/core
yarn add @mailwoman/codex @mailwoman/core
pnpm add @mailwoman/codex @mailwoman/core
bun add @mailwoman/codex @mailwoman/core
Save this complete file as schema.ts:
import { COMPONENT_TAGS, BIO_LABELS } from "@mailwoman/codex/component"
import { QueryKindSchema } from "@mailwoman/core/pipeline"
console.log("component tags:", COMPONENT_TAGS.join(", "))
console.log("BIO labels:", BIO_LABELS.length)
console.log("query kinds:", QueryKindSchema.options.join(", "))
Run it with node schema.ts. The following output was captured from the published 11.0.0 packages:
component tags: country, region, locality, dependent_locality, postcode, subregion, house_number, street, street_prefix, street_prefix_particle, street_suffix, intersection_a, intersection_b, unit, venue, attention, po_box, cedex, prefecture, municipality, district, block, sub_block, building_number, building_name, locality_unit
BIO labels: 53
query kinds: postcode_only, locality_only, structured_address, intersection, po_box, landmark, poi_query, vague, bare_toponym, route_pair, near_me, poi_category
See also
- Install Mailwoman and inspect a first parse runs a local parser and prints its tree.
- Inspect the decisions behind a parse checks each returned spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. and reads a debug trace.