FreeBASIC ExtLibaspell
目次→その他→ライブラリ・ヘッダー索引→GNU Aspell←オリジナル・サイト
目次→FreeBASIC のハッキング→FreeBASIC でのハッキングのための情報→外部ライブラリ索引→GNU Aspell←オリジナル・サイト
GNU Aspell
無料でオープン・ソースの、スペル・チェッカー。
ウエブ・サイト: http://aspell.net/∞
利用できる環境: Win32, Linux
include するヘッダー: aspell.bi
ヘッダー・バージョン: 0.60.6.1
例:
'' GNU-ASspell の例, http://aspell.net/win32/ から変換
#include once "aspell.bi"
Dim As AspellConfig Ptr spell_config = new_aspell_config()
'' 必要により、インストールされた辞書言語に適するように、これを変更します。
aspell_config_replace(spell_config, "lang", "en_CA")
'' speller オブジェクトを生成します
Dim As AspellCanHaveError Ptr possible_err = new_aspell_speller(spell_config)
If (aspell_error_number(possible_err) <> 0) Then
Print *aspell_error_message(possible_err)
End 1
End If
Dim As AspellSpeller Ptr speller = to_aspell_speller(possible_err)
Dim As String word
Do
Print
Input "Enter a word (blank to quit): ", word
If (Len(word) = 0) Then
Exit Do
End If
If (aspell_speller_check(speller, StrPtr(word), Len(word)) <> 0) Then
Print "Word is Correct"
Else
Print "Suggestions:"
Dim As AspellStringEnumeration Ptr elements = _
aspell_word_list_elements(aspell_speller_suggest(speller, StrPtr(word), Len(word)))
Do
Dim As Const ZString Ptr w = aspell_string_enumeration_next(elements)
If (w = 0) Then
Exit Do
End If
Print " "; *w
Loop
delete_aspell_string_enumeration(elements)
End If
' - 置換を報告します
'aspell_speller_store_repl(speller, misspelled_word, size,
' correctly_spelled_word, size);
' - セッションまたは個人辞書に、追加します
'aspell_speller_add_to_session|personal(speller, word, size)
Loop
delete_aspell_speller(speller)
ページ歴史:2018-09-03 16:39:38
日本語翻訳:WATANABE Makoto、原文著作者:JeffMarshall