Lingua::Klingon::Segment - Segment Klingon words into syllables and letters


Lingua-Klingon-Segment documentation  | view source Contained in the Lingua-Klingon-Segment distribution.

Index


NAME

Top

Lingua::Klingon::Segment - Segment Klingon words into syllables and letters

VERSION

Top

This document refers to version 1.03 of Lingua::Klingon::Segment, released on 2004-05-17.

SYNOPSIS

Top

  use Lingua::Klingon::Segment;

  my @syllables = Lingua::Klingon::Segment::syllabify('monghom');
  # @syllables = qw(mon ghom)

  my @letters = Lingua::Klingon::Segment::spell('monghom');
  # @letters = qw(m o n gh o m)

or

  use Lingua::Klingon::Segment ':all';

  my @syllables = syllabify('mongHom');
  # @syllables = qw(mong Hom)

  my @letters = spell('mongHom');
  # @letters = qw(m o ng H o m)

or

  use Lingua::Klingon::Segment qw( syllabify );

  my @syllables = syllabify('vavoy');
  # @syllables = qw(va voy)

DESCRIPTION

Top

Overview

Lingua::Klingon::Segment is a module which allows you to decompose Klingon words into syllables and letters.

Exports

Lingua::Klingon::Segment exports no functions by default, in order to avoid namespace pollution. However, all functions listed here can be imported explicitly by naming them, or they can be imported all together by using the tag ':all'.

syllabify

This subroutine splits a given word or phrase into syllables. It returns the list of syllables that make up that word or phrase.

If the input is a multi-word phrase, the output is the list of all syllables in that phrase, regardless of which word they came from (for example, the output of "syllabify 'jISop vIneH'" is qw(jI Sop vI neH).

In scalar context, returns the number of syllables in the input.

spell

This subroutine splits a given word or phrase into letters. It returns the list of letters that make up that word or phrase (counting all Klingon letters as one, including 'ch', 'gh', 'ng', and 'tlh').

If the input is a multi-word phrase, the output is the list of all Klingon letters in that phrase. Non-letters such as spaces or punctuation are not included.

If the input includes words which are not Klingon words, the output is undefined.

In scalar context, returns the number of Klingon letters in the input.

BUGS

Top

None currently known. If you find any, please email me.

SEE ALSO

Top

strcoll(3), strxfrm(3)

FEEDBACK

Top

If you use this module, I'd appreciate it if you drop me a line at the email address in AUTHOR, just so that I have an idea of how many people use this module at all. Also, if you have any comments, feel free to email me.

AUTHOR

Top

Philip Newton, <pne@cpan.org>

COPYRIGHT AND LICENSE

Top


Lingua-Klingon-Segment documentation  | view source Contained in the Lingua-Klingon-Segment distribution.