Repository navigation
v1.8.25 - Contextual Proper Name Detection, Smarter Title Casing, and Expanded Regression Coverage
LatestThis release introduces a major update for TitleCaser's contextual title-casing capabilities, significantly improves regression coverage, and reorganizes the project's testing infrastructure for future development. The primary addition is contextual proper-name candidate detection, allowing ambiguous lowercase names to be recognized only when they appear within verified coordinated lists of person names. The release also broadens support for protected tokens, Wikipedia-specific behavior, compound capitalization, and phrasal verbs while adding extensive historical regression coverage across supported styles.
Updates
- Introduced
dictionaryGetCoordinatedListProperNameCandidatesfor contextual proper-name candidate detection. - Detects ambiguous lowercase given names appearing as the sole lowercase outlier within coordinated lists of likely person names.
- Returns positional metadata for downstream capitalization while remaining deterministic and independent of named entity recognition.
- Added a dedicated phrasal-verb dataset supporting cases such as Find Out, Turn On, and Sign Up.
- Added new detector utilities to support future contextual heuristics.
Title-Casing Improvements
- Improved contextual phrase handling in Wikipedia mode.
- Added configurable
wikipediaPreserveUserCapitalizationandwikipediaPreserveAllCapsbehavior. - Improved demonym recognition.
- Improved punctuation and quotation boundary handling.
- Improved emphasis, quoted-title, colon, slash-compound, and absolute-path handling.
- Preserves canonical dotted technology names such as
Node.jsandBattle.netwithout incorrectly treating them as domains. - Improved handling of apostrophized names and possessives, including canonical
O’Connorcasing. - Improved NYT hyphenated compound capitalization through the new
capitalizeCompoundSegmenthelper (for example, Step-by-Step).
Testing & Infrastructure
- Reorganized the test suite into a cleaner, fixture-driven architecture.
- Moved shared helpers into
__tests__/helpers. - Consolidated regression fixtures under
__tests__/fixtures. - Restricted Jest discovery to explicit test/spec files.
- Added historical regression coverage for previously missing style-specific edge cases.
- Added comprehensive regression tests for coordinated-list proper-name detection.
- Added extensive negative coverage for ordinary prose, labels, quoted text, URLs, paths, email addresses, identifiers, and other protected contexts.
- Exposed structural coordinated-list matches to enable more precise detector testing.
Bug Fixes
- Fixed a Wikipedia sentence-boundary regression involving quoted punctuation.
- Fixed sentence-final punctuation being incorrectly interpreted as a path delimiter.
- Added support for a single lowercase known-given-name outlier (for example,
jack) while preserving the existing ambiguous-name behavior for names such asrocky. - Corrected helper imports and documentation package synchronization paths following the test infrastructure reorganization.
Specification Coverage
- Expanded AP Style regression coverage.
- Expanded NYT Style regression coverage.
- Added additional fixture-driven regression tests across supported title-casing styles.
Tickets related:
Full Changelog: v1.8.16...v1.8.25