Title Case Converter

FREEMIUM
Verified
От Matt11 | Обновлено 6 месяцев назад | News, Media
Популярность

9 / 10

Задержка

237ms

Уровень обслуживания

100%

Обзор Title Case Converter

Подписчики: 8
Ресурсы:
Сайт продукта
Создатель API:
avatar
Matt11
Matt11
Оценить API:
Войдите, чтобы оценить API

ПРОЧТИ МЕНЯ

Simply put, title case means to capitalize every word except articles (a, an, the), conjunctions (and, or, but, …) and (short) prepositions (in, on, for, …). This is trickier than it seems, because many words can be used in different grammatical functions. For example, in “Lay It All on Me,” “on” is a preposition and must be lowercased, but it is used as an adjective in “It’s On Again” and as an adverb in “I Could Go On Singing,” so it must be capitalized in these sentences. The title case converter is able to handle cases like this correctly.

Endpoint Title Case

This endpoint supports the following parameters:

title

The title to be converted to title case. The maximum length is 300 characters; if the title is longer, it will be cut off.

style

Specifies the title case style to be used. The possible values are:

  • AMA: AMA Manual of Style
  • AP: The Associated Press Stylebook (rules for composition titles)
  • APA: Publication Manual of the American Psychological Association
  • BB: The Bluebook
  • CMOS: The Chicago Manual of Style
  • MLA: MLA Handbook
  • NYT: The New York Times Manual of Style and Usage
  • WP: Wikipedia Manual of Style (MOS:CT)

See Title Capitalization Rules for a detailed description of the different title case styles.

preserveAllCaps

This parameter specifies whether words in all caps should be left unchanged. Possible values are:

  • 0 / false (default): Words in all caps will be not be kept in all caps, except for words that the converter recognizes as an acronym.
  • 1 / true: Words in all caps will be kept unchanged.

Example:

input output with preserveAllCaps == 0 output with preserveAllCaps == 1
contact us asap for a free consultation Contact Us ASAP for a Free Consultation Contact Us ASAP for a Free Consultation
Contact Us ASAP for a FREE Consultation Contact Us ASAP for a Free Consultation Contact Us ASAP for a FREE Consultation
CONTACT US ASAP FOR A FREE CONSULTATION Contact Us ASAP for a Free Consultation CONTACT US ASAP FOR a FREE CONSULTATION

useStraightQuotes

Specifies if quotes should be output as straight quotes (also known as “dumb” quotes or typewriter quotes) or curly quotes (also known as “smart” quotes or typographer’s quotes). This affects single and double quotation marks, apostrophes, and single and double primes. Possible values are:

  • 0 / false (default): use curly quotes
  • 1 / true: use straight quotes

Example:

input output with useStraightQuotes == 0 output with useStraightQuotes == 1
"He's 5" 10' and likes '60s rock 'n' roll" “He’s 5″ 10′ and Likes ’60s Rock ’n’ Roll” "He's 5" 10' and Likes '60s Rock 'n' Roll"
“He’s 5″ 10′ and likes ’60s rock ’n’ roll” “He’s 5″ 10′ and Likes ’60s Rock ’n’ Roll” "He's 5" 10' and Likes '60s Rock 'n' Roll"

tagSpeciesNames

Specifies if scientific species names should be tagged. The possible values are:

  • 0 (default): species names are not tagged (but they are still correctly capitalized)
  • 1: the complete species name is tagged using <ScientificName>
  • 2: the parts of the species name that are customarily written in italics are tagged using <em>

NB: While the title case converter supports millions of species names, it will not be able to detect every existing species name.

Example:

input output with tagSpeciesNames == 0 output with tagSpeciesNames == 1 output with tagSpeciesNames == 2
four new diterpenoid alkaloids from aconitum japonicum subsp. subcuneatum Four New Diterpenoid Alkaloids from Aconitum japonicum subsp. subcuneatum Four New Diterpenoid Alkaloids from <ScientificName>Aconitum japonicum subsp. subcuneatum</ScientificName> Four New Diterpenoid Alkaloids from <em>Aconitum japonicum</em> subsp. <em>subcuneatum</em>

Endpoint Bulk Title Case

Use this endpoint to convert multiple titles at once. Calling this endpoint once for 500 titles, for example, is much faster than calling the Title Case endpoint 500 times in a row. The body of the POST request must contain a JSON object with the following structure:

{
  "titles": [
    "a fistful of dollars",
    "for a few dollars more",
    "the good, the bad and the ugly"
  ],
  "style": "AP",
  "preserveAllCaps": 1,
  "tagSpeciesNames": 0,
  "useStraightQuotes": 0
}

The parameters preserveAllCaps, tagSpeciesNames and useStraightQuotes are optional. These parameters, as well as the mandatory parameter style, take the same values as documented above for the Title Case endpoint.

The mandatory parameter titles supports up to 1000 titles. Any additional titles are ignored. Each title in the request counts as one title against your quota. The maximum length per title is 300 characters; longer titles are cut off.

The conversion result is returned as a JSON object with the following structure:

{
  "results": [
    "A Fistful of Dollars",
    "For a Few Dollars More",
    "The Good, the Bad and the Ugly"
  ]
}
Оценки: 5 - Голосов: 1