Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Lingua::PT::Hyphenate
Separates Portuguese words in syllables

Lingua::PT::Hyphenate - Separates Portuguese words in syllables


NAME

Lingua::PT::Hyphenate - Separates Portuguese words in syllables


SYNOPSIS


  use Lingua::PT::Hyphenate;

  @syllables = hyphenate("teste")   # @syllables now hold ('tes', 'te')

  # or

  $word = new Lingua::PT::Hyphenate;

  @syllables = $word->hyphenate;


DESCRIPTION

Separates Portuguese words into syllables.


ALGORITHM

The algorithm has several steps, but all of them consist on marking points of the word that either are to be separated or that are not allowed to be separated.

After all those main steps are fulfilled, the marks for non-separation are removed and the word is finally splitted by the other marks and returned as an array.


METHODS

new

Creates a new Lingua::PT::Hyphenate object.


  $word = Lingua::PT::Hyphenate->new("palavra");

  # "palavra" is Portuguese for "word"

If you're doing this lots of time, it would probably be better for you to use the hyphenate function directly (that is, creating a new object for each word in a long text doesn't seem so bright if you're not going to use it later on).

hyphenate

Separates a Portuguese in syllables.


  my @syllables = hyphenate('palavra');

  # @syllables now hold ('pa', 'la', 'vra')

  # or, if you created an object

  my @syllables = $word->hyphenate


TO DO


SEE ALSO

Gramatica Universal da Lingua Portuguesa (Texto Editora)

More tools for the Portuguese language processing can be found at the Natura project: http://natura.di.uminho.pt


AUTHOR

Jose Castro, <cog@cpan.org>


COPYRIGHT AND LICENSE

Copyright 2004 by Jose Castro

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy