use WordLists::Common qw(pretty_doubles pretty_singles);
print pretty_doubles (pretty_singles (
qq{"That's right," she said, "I was told to 'get lost!'".}
) );
=head1 DESCRIPTION
This provides common functions and values of relevance to wordlists - such as normalising parts of speech and typographic dashes and quotes. Exportable functions and values include:
=over
=item *
C<@sPosWords>, a list of things which look like parts of speech (to help parsing things like "head verb", "head up", "head noun")
=item *
A function C<pretty_endash> replacing space + hyphen + space with space + en-dash + space.
=item *
A function C<pretty_doubles> replacing double quotes with 'smart' double quotes.
=item *
A function C<pretty_singles> replacing apostrophe/single-quote with 'smart' single quotes.
=item *
A function C<norm_spacing>
=item *
A function C<custom_norm> which takes several options:
=over
=item *
C<lc> - if true, lowercases the string.
=item *
C<uc> - if true, uppercases the string. Overrides C<lc>.
=item *
C<trim_space> - if true, removes initial and final space, and also condenses repeating white space to a single C<\x20>.
=item *
C<alnum_only> - if true, removes characters other than alphabetic ones or digits.
=item *
C<brackets> - if this is 'kill', removes the contents of any C<()> brackets; if 'ignore', removes the brackets themselves.
=item *
C<squares> - if this is 'kill', removes the contents of any C<[]> brackets; if 'ignore', removes the brackets themselves.
=item *
C<accents> - if true, removes accents and modifier characters from letters.
=item *
C<sb> - if true, replaces 'sb' with 'someone'.
=item *
C<sth> - if true, replaces 'sth' with 'something'.
=back
=item *
A function C<generic_norm_hw> which returns a word without accents or characters other than [a-z0-9].
=item *
A function C<generic_norm_pos> for normalising parts of speech so that 'v' and 'verb' match.
=item *
A function C<generic_minimal_pos> which will normalise parts of speech and reduce them to 'minimal' ones.
=item *
A function C<uniques> which will reduce a list to the unique members.