source: pymigemo/trunk/README.rst @ 226

Revision 226, 5.2 KB checked in by atzm, 11 years ago (diff)
  • change documentation format to rst
  • Property svn:keywords set to Id

:mod:`migemo` --- C/Migemo の Python バむンディング

System Message: WARNING/2 (<string>, line 4)

Title underline too short.

:mod:`migemo` --- C/Migemo の Python バむンディング
===================================================

System Message: ERROR/3 (<string>, line 3); backlink

Unknown interpreted text role "mod".

System Message: ERROR/3 (<string>, line 6)

Unknown directive type "module".

.. module:: migemo
   :synopsis: C/Migemo の Python バむンディング

System Message: ERROR/3 (<string>, line 8)

Unknown directive type "moduleauthor".

.. moduleauthor:: Atzm WATANABE <atzm@atzm.org>

C/Migemo を Python から利甚するための拡匵モゞュヌルです

このモゞュヌルの利甚にあたっおは C/Migemo がむンストヌルされおいるこずが前提ずなっおいたす ラむブラリ怜玢パスに migemo.so が ヘッダ怜玢パスに migemo.h が存圚するこずをご確認䞋さい

むンストヌル

System Message: WARNING/2 (<string>, line 19)

Title underline too short.

むンストヌル
------------

同梱の setup.py をご利甚䞋さい:

$ ./setup.py build
# ./setup.py install

基本的な䜿い方

System Message: WARNING/2 (<string>, line 26)

Title underline too short.

基本的な䜿い方
--------------

基本的な䜿い方は以䞋のようになりたす:

>>> import migemo
>>> m = migemo.Migemo('/usr/share/migemo/migemo-dict')
>>> print(m.query('hoge'))
(hoge|ïœ

System Message: WARNING/2 (<string>, line 33)

Literal block ends without a blank line; unexpected unindent.

|ほげ|捕鯚|垆桁|è£œå ƒ|ホゲ)

System Message: WARNING/2 (<string>, line 33); backlink

Inline substitution_reference start-string without end-string.

:meth:`Migemo.query` メ゜ッドに文字列を枡すず正芏衚珟が unicode で返りたす この正芏衚珟を :mod:`re` ず組み合わせれば怜玢等の甚途に利甚するこずができたす

System Message: ERROR/3 (<string>, line 36); backlink

Unknown interpreted text role "meth".

System Message: ERROR/3 (<string>, line 36); backlink

Unknown interpreted text role "mod".

Note

返华される正芏衚珟は読み蟌んだ蟞曞によっお異なるので å¿

System Message: WARNING/2 (<string>, line 42)

Explicit markup ends without a blank line; unexpected unindent.

ずしも䞊蚘の通りになるずは限りたせん

リファレンス

System Message: WARNING/2 (<string>, line 45)

Title underline too short.

リファレンス
------------

:class:`Migemo` クラス

System Message: WARNING/2 (<string>, line 48)

Title underline too short.

:class:`Migemo` クラス
``````````````````````

System Message: ERROR/3 (<string>, line 47); backlink

Unknown interpreted text role "class".

migemo をハンドルするクラスです dictionary は利甚する migemo-dict 蟞曞ファむルのパスです

System Message: ERROR/3 (<string>, line 55)

Unknown directive type "method".

.. method:: query(query)
   *query* から正芏衚珟を unicode で返したす
   *query* は unicode でも゚ンコヌドされた文字列でも構いたせん
   ただし *query* が文字列の堎合
   その゚ンコヌディングが蟞曞の゚ンコヌディングず異なるず
   ゚ラヌずなる可胜性がありたす

System Message: ERROR/3 (<string>, line 63)

Unknown directive type "method".

.. method:: is_enable()
   蟞曞を正垞に読み蟌めおいるかどうかチェックしたす
   正垞に読み蟌めおいる堎合は ``True`` が
   そうでない堎合は ``False`` が返りたす

System Message: ERROR/3 (<string>, line 69)

Unknown directive type "method".

.. method:: load(dict_id, dict_file)
   蟞曞を読み蟌みたす
   *dict_id* は埌述の DICTID のいずれかで読み蟌む蟞曞の皮類を指定したす
   *dict_file* は蟞曞ファむルのパスです
   このメ゜ッドは成功するず読み蟌んだ蟞曞の DICTID を返したす
   読み蟌みに倱敗した堎合は :data:`DICTID_INVALID` を返したす

System Message: ERROR/3 (<string>, line 77)

Unknown directive type "method".

.. method:: get_operator(index)
   *index* で指定された正芏衚珟に䜿甚するメタ文字を返したす
   *index* は埌述の OPINDEX のいずれかを指定するå¿

System Message: WARNING/2 (<string>, line 81)

Explicit markup ends without a blank line; unexpected unindent.

芁がありたす

System Message: ERROR/3 (<string>, line 83)

Unknown directive type "method".

.. method:: set_operator(index, op)
   *index* で指定された正芏衚珟に䜿甚するメタ文字を *op* に倉曎したす
   *index* は埌述の OPINDEX のいずれかを指定するå¿

System Message: WARNING/2 (<string>, line 87)

Block quote ends without a blank line; unexpected unindent.
芁がありたす
倉曎に成功すれば True が倱敗すれば False が返りたす

System Message: ERROR/3 (<string>, line 90)

Unknown directive type "method".

.. method:: get_encoding()
   読み蟌んだ蟞曞の゚ンコヌディングを文字列で返したす
   䟋えば EUC-JP で曞かれた蟞曞であれば ``'euc_jp'`` が返りたす
   ``'cp932'`` か ``'euc_jp'`` か ``'utf8'`` か ``'ascii'``
   のいずれかが返りたす

DICTID

:meth:`Migemo.load` で利甚する蟞曞の皮類です

System Message: ERROR/3 (<string>, line 100); backlink

Unknown interpreted text role "meth".

System Message: ERROR/3 (<string>, line 102)

Unknown directive type "data".

.. data:: DICTID_MIGEMO
   migemo-dict 蟞曞を瀺したす

System Message: ERROR/3 (<string>, line 106)

Unknown directive type "data".

.. data:: DICTID_ROMA2HIRA
   ロヌマ字→平仮名倉換衚を瀺したす

System Message: ERROR/3 (<string>, line 110)

Unknown directive type "data".

.. data:: DICTID_HIRA2KATA
   平仮名→カタカナ倉換衚を瀺したす

System Message: ERROR/3 (<string>, line 114)

Unknown directive type "data".

.. data:: DICTID_HAN2ZEN
   半角→å

System Message: WARNING/2 (<string>, line 117)

Explicit markup ends without a blank line; unexpected unindent.

šè§’倉換衚を瀺したす

System Message: ERROR/3 (<string>, line 119)

Unknown directive type "data".

.. data:: DICTID_ZEN2HAN
   å

System Message: WARNING/2 (<string>, line 122)

Explicit markup ends without a blank line; unexpected unindent.

šè§’→半角倉換衚を瀺したす

System Message: ERROR/3 (<string>, line 124)

Unknown directive type "data".

.. data:: DICTID_INVALID
   蟞曞の読み蟌みに倱敗した堎合に返る DICTID です

OPINDEX

:meth:`Migemo.get_operator` たたは :meth:`Migemo.set_operator` で利甚するメタ文字の皮類です

System Message: ERROR/3 (<string>, line 131); backlink

Unknown interpreted text role "meth".

System Message: ERROR/3 (<string>, line 131); backlink

Unknown interpreted text role "meth".

System Message: ERROR/3 (<string>, line 134)

Unknown directive type "data".

.. data:: OPINDEX_OR
   論理和を瀺したす
   デフォルトは ``'|'`` です

System Message: ERROR/3 (<string>, line 139)

Unknown directive type "data".

.. data:: OPINDEX_NEST_IN
   グルヌピング時の開き括匧を瀺したす
   デフォルトは ``'('`` です

System Message: ERROR/3 (<string>, line 144)

Unknown directive type "data".

.. data:: OPINDEX_NEST_OUT
   グルヌピング時の閉じ括匧を瀺したす
   デフォルトは ``')'`` です

System Message: ERROR/3 (<string>, line 149)

Unknown directive type "data".

.. data:: OPINDEX_SELECT_IN
   遞択の開始を衚す開き鈎括匧を瀺したす
   デフォルトは ``'['`` です

System Message: ERROR/3 (<string>, line 154)

Unknown directive type "data".

.. data:: OPINDEX_SELECT_OUT
   遞択の終了を衚す閉じ鈎括匧を瀺したす
   デフォルトは ``']'`` です

System Message: ERROR/3 (<string>, line 159)

Unknown directive type "data".

.. data:: OPINDEX_NEWLINE
   各文字の間に挿å

System Message: WARNING/2 (<string>, line 162)

Explicit markup ends without a blank line; unexpected unindent.
¥ã•ã‚Œã‚‹ã€Œ0 個以䞊の空癜もしくは改行にマッチする」
パタヌンを瀺したす デフォルトは '' です

VERSION

migemo のバヌゞョンです

System Message: ERROR/3 (<string>, line 171)

Unknown directive type "data".

.. data:: MIGEMO_VERSION
   C/Migemo のバヌゞョンを瀺したす

System Message: ERROR/3 (<string>, line 175)

Unknown directive type "data".

.. data:: PYMIGEMO_VERSION
   PyMigemo のバヌゞョンを瀺したす

ラむセンス

System Message: WARNING/2 (<string>, line 180)

Title underline too short.

ラむセンス
----------
二条é
BSD ラむセンスに準拠したす

System Message: WARNING/2 (<string>, line 183)

Definition list ends without a blank line; unexpected unindent.

詳现は同梱の LICENSE ファむルをご芧䞋さい

Note: See TracBrowser for help on using the repository browser.