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

  1. 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.
  2. Enter copy, courtesyTitles, maximumOccurrences using the field table and calculation rules, then run the tool.
  3. Read occurrenceCount, repeatedTitles, withinLimit. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. 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 fieldMeaningValue type; see rules belowRequirement
copyCopy to inspectstringRequired
courtesyTitlesCourtesy titles to countlist of stringRequired
maximumOccurrencesMaximum allowed occurrencesinteger; minimum: 0Required

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 fieldMeaningValue type
occurrenceCountCourtesy-title occurrencesinteger; minimum: 0
repeatedTitlesTitles exceeding one occurrencelist of string
withinLimitWithin supplied occurrence limitboolean
json
{
  "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

  1. Courtesy Title Repetition — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies