jp.go.nict.langrid.servicecontainer.executor.protobufrpc
クラス PbBilingualDictionaryWithLongestMatchSearchServiceExecutor

java.lang.Object
  上位を拡張 jp.go.nict.langrid.servicecontainer.service.component.AbstractServiceExecutor
      上位を拡張 jp.go.nict.langrid.servicecontainer.executor.protobufrpc.AbstractPbServiceExecutor
          上位を拡張 jp.go.nict.langrid.servicecontainer.executor.protobufrpc.PbBilingualDictionaryWithLongestMatchSearchServiceExecutor
すべての実装されたインタフェース:
BilingualDictionaryService, BilingualDictionaryWithLongestMatchSearchService

public class PbBilingualDictionaryWithLongestMatchSearchServiceExecutor
extends AbstractPbServiceExecutor
implements BilingualDictionaryWithLongestMatchSearchService

Protocol Buffers 用 外部翻訳サービス呼び出しクラス

作成者:
Takao Nakaguchi

コンストラクタの概要
PbBilingualDictionaryWithLongestMatchSearchServiceExecutor(String invocationName)
           
PbBilingualDictionaryWithLongestMatchSearchServiceExecutor(String invocationName, long invocationId, Endpoint endpoint)
           
 
メソッドの概要
 Calendar getLastUpdate()
          辞書データの最終更新日を返す。
 LanguagePair[] getSupportedLanguagePairs()
          辞書の対応言語を取得する。
 String[] getSupportedMatchingMethods()
          辞書ラッパーが対応している検索手法を返す。
 Translation[] search(String headLang, String targetLang, String headWord, String matchingMethod)
          指定された検索語・検索方法で対訳辞書を検索し、対訳を返します。
 TranslationWithPosition[] searchLongestMatchingTerms(String headLang, String targetLang, Morpheme[] morphemes)
          形態素の配列を元に検索を行います。
 
クラス jp.go.nict.langrid.servicecontainer.executor.protobufrpc.AbstractPbServiceExecutor から継承されたメソッド
postprocessPb, preprocessPb
 
クラス jp.go.nict.langrid.servicecontainer.service.component.AbstractServiceExecutor から継承されたメソッド
getInvocationName, postprocess, preprocess
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

PbBilingualDictionaryWithLongestMatchSearchServiceExecutor

public PbBilingualDictionaryWithLongestMatchSearchServiceExecutor(String invocationName)

PbBilingualDictionaryWithLongestMatchSearchServiceExecutor

public PbBilingualDictionaryWithLongestMatchSearchServiceExecutor(String invocationName,
                                                                  long invocationId,
                                                                  Endpoint endpoint)
メソッドの詳細

searchLongestMatchingTerms

public TranslationWithPosition[] searchLongestMatchingTerms(String headLang,
                                                            String targetLang,
                                                            Morpheme[] morphemes)
                                                     throws AccessLimitExceededException,
                                                            InvalidParameterException,
                                                            LanguagePairNotUniquelyDecidedException,
                                                            NoAccessPermissionException,
                                                            NoValidEndpointsException,
                                                            ProcessFailedException,
                                                            ServerBusyException,
                                                            ServiceNotActiveException,
                                                            ServiceNotFoundException,
                                                            UnsupportedLanguagePairException,
                                                            UnsupportedMatchingMethodException
インタフェース BilingualDictionaryWithLongestMatchSearchService の記述:
形態素の配列を元に検索を行います。 動詞を除く形態素を連結し、得られた語を検索します。 見つかった語の中から最も長いものを検索結果に追加します。 複数の検索が行われ、見出し語のことなる検索結果が複数返される可能性があります。

定義:
インタフェース BilingualDictionaryWithLongestMatchSearchService 内の searchLongestMatchingTerms
パラメータ:
headLang - 対訳の元言語(RFC3066準拠)
targetLang - 対訳の対象言語(RFC3066準拠)
morphemes - 形態素の配列
戻り値:
検索結果
例外:
AccessLimitExceededException - アクセス制限に違反した
InvalidParameterException - headLang,targetLang,searchMethodのいずれかがnullまたは空文字列.headLang,targetLangがRFC3066に準拠していない.searchMethodが規定されている以外の文字列
LanguagePairNotUniquelyDecidedException - 対訳言語対候補が一意に求まらない(例:headLangもしくはtargetLangにzhを指定したときに,対応言語対にzh-Hansとzh-Hantが存在した場合)
UnsupportedLanguagePairException - 指定された言語対はサポートされていない
UnsupportedMatchingMethodException - 指定されたマッチング方法はサポートされていない
NoAccessPermissionException - 呼び出しを行ったユーザに実行権限が無い
NoValidEndpointsException - 有効なエンドポイントが無い
ProcessFailedException - 検索処理に失敗した
ServerBusyException - サーバが混雑していて処理が実行できない
ServiceNotActiveException - サービスはアクティブではない
ServiceNotFoundException - 指定されたサービスが見つからない

search

public Translation[] search(String headLang,
                            String targetLang,
                            String headWord,
                            String matchingMethod)
                     throws AccessLimitExceededException,
                            InvalidParameterException,
                            LanguagePairNotUniquelyDecidedException,
                            NoAccessPermissionException,
                            NoValidEndpointsException,
                            ProcessFailedException,
                            ServerBusyException,
                            ServiceNotActiveException,
                            ServiceNotFoundException,
                            UnsupportedLanguagePairException,
                            UnsupportedMatchingMethodException
インタフェース BilingualDictionaryService の記述:
指定された検索語・検索方法で対訳辞書を検索し、対訳を返します。

定義:
インタフェース BilingualDictionaryService 内の search
パラメータ:
headLang - 対訳の元言語(RFC3066準拠)
targetLang - 対訳の対象言語(RFC3066準拠)
headWord - 対訳を検索する語
matchingMethod - マッチング方法("COMPLETE","PREFIX","SUFFIX","PARTIAL","REGEX"のいずれか)
戻り値:
検索結果
例外:
AccessLimitExceededException - アクセス制限に違反した
InvalidParameterException - headLang,targetLang,searchMethodのいずれかがnullまたは空文字列.headLang,targetLangがRFC3066に準拠していない.searchMethodが規定されている以外の文字列
LanguagePairNotUniquelyDecidedException - 対訳言語対候補が一意に求まらない(例:headLangもしくはtargetLangにzhを指定したときに,対応言語対にzh-Hansとzh-Hantが存在した場合)
UnsupportedLanguagePairException - 指定された言語対はサポートされていない
UnsupportedMatchingMethodException - 指定されたマッチング方法はサポートされていない
NoAccessPermissionException - 呼び出しを行ったユーザに実行権限が無い
NoValidEndpointsException - 有効なエンドポイントが無い
ProcessFailedException - 検索処理に失敗した
ServerBusyException - サーバが混雑していて処理が実行できない
ServiceNotActiveException - サービスはアクティブではない
ServiceNotFoundException - 指定されたサービスが見つからない

getLastUpdate

public Calendar getLastUpdate()
                       throws AccessLimitExceededException,
                              NoAccessPermissionException,
                              NoValidEndpointsException,
                              ProcessFailedException,
                              ServerBusyException,
                              ServiceNotActiveException,
                              ServiceNotFoundException
インタフェース BilingualDictionaryService の記述:
辞書データの最終更新日を返す。

定義:
インタフェース BilingualDictionaryService 内の getLastUpdate
戻り値:
最終更新日
例外:
AccessLimitExceededException - アクセス制限に違反した
NoAccessPermissionException - 呼び出しを行ったユーザに実行権限が無い
NoValidEndpointsException - 有効なエンドポイントが無い
ProcessFailedException - 検索処理に失敗した
ServerBusyException - サーバが混雑していて処理が実行できない
ServiceNotActiveException - サービスはアクティブではない
ServiceNotFoundException - 指定されたサービスが見つからない

getSupportedLanguagePairs

public LanguagePair[] getSupportedLanguagePairs()
                                         throws AccessLimitExceededException,
                                                NoAccessPermissionException,
                                                NoValidEndpointsException,
                                                ProcessFailedException,
                                                ServerBusyException,
                                                ServiceNotActiveException,
                                                ServiceNotFoundException
インタフェース BilingualDictionaryService の記述:
辞書の対応言語を取得する。

定義:
インタフェース BilingualDictionaryService 内の getSupportedLanguagePairs
戻り値:
言語の配列
例外:
AccessLimitExceededException - アクセス制限に違反した
NoAccessPermissionException - 呼び出しを行ったユーザに実行権限が無い
NoValidEndpointsException - 有効なエンドポイントが無い
ProcessFailedException - 検索処理に失敗した
ServerBusyException - サーバが混雑していて処理が実行できない
ServiceNotActiveException - サービスはアクティブではない
ServiceNotFoundException - 指定されたサービスが見つからない

getSupportedMatchingMethods

public String[] getSupportedMatchingMethods()
                                     throws AccessLimitExceededException,
                                            NoAccessPermissionException,
                                            NoValidEndpointsException,
                                            ProcessFailedException,
                                            ServerBusyException,
                                            ServiceNotActiveException,
                                            ServiceNotFoundException
インタフェース BilingualDictionaryService の記述:
辞書ラッパーが対応している検索手法を返す。

定義:
インタフェース BilingualDictionaryService 内の getSupportedMatchingMethods
戻り値:
対応している検索方法の配列
例外:
AccessLimitExceededException - アクセス制限に違反した
NoAccessPermissionException - 呼び出しを行ったユーザに実行権限が無い
NoValidEndpointsException - 有効なエンドポイントが無い
ProcessFailedException - 検索処理に失敗した
ServerBusyException - サーバが混雑していて処理が実行できない
ServiceNotActiveException - サービスはアクティブではない
ServiceNotFoundException - 指定されたサービスが見つからない