Courtesy Title Repetition
Count repeated courtesy titles in copy against a supplied limit.
Description
Courtesy-title repetition counts listed strings within text.
Courtesy-title repetition counts listed strings within text. Repeated labels are those with more than one occurrence of their own pattern.1
Count repeated courtesy titles in copy against a supplied limit.
When to use Courtesy Title Repetition
Use this tool to count repeated courtesy titles in copy against a supplied limit.
Prepare the text, recorded observations, aligned figures or editorial criteria requested. Confirm what each label, count, timestamp or supplied flag represents before interpreting the result.
How to use Courtesy Title Repetition and understand its results
- Prepare the text, recorded observations, aligned figures or editorial criteria requested. Confirm what each label, count, timestamp or supplied flag represents before interpreting the result.
- Enter copy, courtesyTitles, maximumOccurrences using the field table and calculation rules, then run the tool.
- Read occurrenceCount, repeatedTitles, withinLimit. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| copy | Copy to inspect | string | Required |
| courtesyTitles | Courtesy titles to count | list of string | Required |
| maximumOccurrences | Maximum allowed occurrences | integer; minimum: 0 | Required |
Enter text, a title list and nonnegative integer maximum. Require each raw title to be nonempty; lowercase without trimming and count nonoverlapping substrings per label. Return repeated original labels, total and inclusive total≤maximum flag. Empty lists are allowed.
total=Σoccurrences; repeated=labels with count>1 Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| occurrenceCount | Courtesy-title occurrences | integer; minimum: 0 |
| repeatedTitles | Titles exceeding one occurrence | list of string |
| withinLimit | Within supplied occurrence limit | boolean |
{
"input": {
"copy": "Dr. Lee met Dr. Jones.",
"courtesyTitles": [
"Dr.",
"Mr."
],
"maximumOccurrences": 2
},
"output": {
"occurrenceCount": 2,
"repeatedTitles": [
"Dr."
],
"withinLimit": true
}
} Limitations and assumptions
Duplicate labels count separately; no word boundaries or honorific appropriateness are checked. Whitespace-only titles are accepted.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Lists are limited to 100,000 entries; the rules above may require smaller limits. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.
Alternative or Complementary methods
Use Obituary Honorific Style: Count obituary honorific usage against a supplied limit. For a complementary task, use Royalty Title Style: Validate a rendered royal reference against supplied title-use policy.
References
-
Courtesy Title Repetition — tool.io
Similar or alternative tools
- Obituary Honorific Style
Count obituary honorific usage against a supplied limit.
- Royalty Title Style
Validate a rendered royal reference against supplied title-use policy.