GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LINGUA::ZH::TABE (3)

.ds Aq ’

NAME

Lingua::ZH::TaBE - Chinese processing via libtabe

CONTENTS

VERSION

This document describes version 0.07 of Lingua::ZH::TaBE, released December 31, 2005.

SYNOPSIS



    use Lingua::ZH::TaBE;

    my $tabe = Lingua::ZH::TaBE->new;

    # Phrase splitter
    my @phrases = $tabe->split(
        "XXXXXXXXXXXXXXXXXXXXXXX".
        "XXXXXXXXXXXXXXXXXX"
    );

    # Chaining various components
    print $tabe->Chu("XXXXXXXX")    # sentence
        ->chunks->[2]       # XXX           # chunk
        ->tsis->[0]         # XX            # phrase
        ->zhis->[1]         # X     # character
        ->yins->[0]         # XXX           # pronounciation
        ->zuyins->[0],      # X     # phonetic symbols



DESCRIPTION

This module is a Perl interface to the <B>TaBEB> (Taiwan and Big5 Encoding) library, an unified interface and library dealing with Chinese words, phrases, sentences, and phonetic symbols; it is intended to be used as the foundation of Chinese text processing.

<B>Lingua::ZH::TaBEB> provides an object-oriented interface (preferred), as well as a procedural interface consisting of all C functions in tabe.h.

Object-Oriented Interface

    Lingua::ZH::TaBE

new( [tsi_db => $file, tsiyin_db => $file] ) Creates a LibTaBE handle and opens databases. If unspecified, find in the usual libtabe data directory automatically.
split( $string [, $method] ) Split the text in $string; returns a list of strings representing the words obtained. You may specify Complex or Backward as $method to use an alternate segmentation algorithm.
Chu(), Chunk(), Tsi(), Zhi(), Yin(), ZuYin() Constructors for various level of objects, each taking one argument for initialization.

    Lingua::ZH::TaBE::Chu

chunks()

    Lingua::ZH::TaBE::Chunk

tsis([$method])

    Lingua::ZH::TaBE::Tsi

zhis()
yins()

    Lingua::ZH::TaBE::Zhi

yins()
ToZhi()
ToZhiCode()
IsBig5Code()
ToPackedBig5Code()
LookupRefCount()

    Lingua::ZH::TaBE::Yin

zuyins()
zhis()
ToYin()
ToZuYinSymbolSequence()

    Lingua::ZH::TaBE::ZuYin

yin()
zhi()

Procedural Interface

All functions below belong to the <B>Lingua::ZH::TaBEB> class; they are not exported by default, but may be imported explicitly, or implicitly via use Lingua::ZH::TaBE :all.



    $TsiDB      = TsiDBOpen($type, $db_name, $flags);
    $num        = TsiInfoLookupPossibleTsiYin($TsiDB, $Tsi);
    $TsiYinDB   = TsiYinDBOpen($type, $db_name, $flags);
    $num        = ChuInfoToChunkInfo($Chu);
    $num        = ChunkSegmentationSimplex($TsiDB, $Chunk);
    $num        = ChunkSegmentationComplex($TsiDB, $Chunk);
    $num        = ChunkSegmentationBackward($TsiDB, $Chunk);
    $num        = TsiInfoLookupZhiYin($TsiDB, $Tsi);
    $string     = YinLookupZhiList($Yin);
    $string     = YinToZuYinSymbolSequence($Yin);
    $yin        = ZuYinSymbolSequenceToYin($string);
    $zhi        = ZuYinIndexToZuYinSymbol($ZuYin);
    $zuyin      = ZuYinSymbolToZuYinIndex($Zhi);
    $zuyin      = ZozyKeyToZuYinIndex($key);
    $num        = ZhiIsBig5Code($Zhi);
    $zhicode    = ZhiToZhiCode($Zhi);
    $zhi        = ZhiCodeToZhi($zhicode);
    $num        = ZhiCodeToPackedBig5Code($zhicode);
    $num        = ZhiCodeLookupRefCount($zhicode);



Constants

All constants below belong to the <B>Lingua::ZH::TaBEB> class; they are not exported by default, but may be imported explicitly, or implicitly via use Lingua::ZH::TaBE :all.



    DB_TYPE_DB                  0
    DB_TYPE_LAST                1
    DB_FLAG_OVERWRITE           0x01
    DB_FLAG_CREATEDB            0x02
    DB_FLAG_READONLY            0x04
    DB_FLAG_NOSYNC              0x08
    DB_FLAG_SHARED              0x10
    DB_FLAG_NOUNPACK_YIN        0x20



CAVEATS

The <B>TsiYinB> family of functions are yet incomplete.

SEE ALSO

<ftp://xcin.linux.org.tw/pub/xcin/libtabe/devel/>

<http://libtabe.sourceforge.net/>

AUTHORS

Audrey Tang <autrijus@autrijus.org>

COPYRIGHT

Copyright 2003, 2004, 2005 by Audrey Tang <autrijus@autrijus.org>.

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

See <http://www.perl.com/perl/misc/Artistic.html>

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 LINGUA::ZH::TABE (3) 2005-12-31

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.