{"size": 1675, "ext": "scrbl", "max_stars_repo_path": "scribblings/english.scrbl", "max_stars_repo_name": "thoughtstem/english", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "scribblings/english.scrbl", "max_issues_repo_name": "thoughtstem/english", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "scribblings/english.scrbl", "max_forks_repo_name": "thoughtstem/english", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 34.8958333333, "max_line_length": 209, "alphanum_fraction": 0.7188059701}
#lang scribble/manual
@require[@for-label[english
                    racket/base]]

@title{english}
@author{thoughtstem}

@defmodule[english]

A utility library for generating English text -- e.g. generating plurals and other grammatical annoyances.


@defproc[(english [s string?] ...) string?]{
  Just combines all the @racket[s] values together with a space in between.

  Also a good place to do post-processing and cleanups that can easliy be expressed as a @racket[regexp-replace].  For example, spaces before commas and semi-colons are automatically deleted.

  TODO: Consider adding (via parameters) various post-processings of this sort.  The existing ones are hard coded at the moment. 
}

@defproc[(plural [s string?]) string?]{
  Takes a string and attempts to make an English plural out of it, if it is not already pluralized.

  It uses some pretty dumb algorithms at the moment.  This could be improved.
}

@defproc[(a/an [s string?]) string?]{
  Takes a string and adds the appropriate article onto it -- depending on whether it begins with a vowel. 
}

@defproc[(list-of [#:or word-for-none "none" string?]
                  [s string?] ...) string?]{
  Takes a list and joins them with commas (including the oxford comma).  Handles lists of zero or more.  You may supply the @racket[word-for-none] argument to configure what happens when there are zero things.
}

@defproc[(itemize [s string?] ...) string?]{
  Takes a list of things and renders them as an item list, like: 1) first thing; 2) second thing; 3) another thing.

  Semi-colons are used as separators.  Numbering (of course) begins at 1.

  TODO: Consider adding ways to configure that.
}





