Instance Method インスタンスメソッド

linguisticTags(in:scheme:options:orthography:tokenRanges:)

Returns an array of linguistic tags for the specified range and requested tags within the receiving string. 受け取っている文字列内で指定された範囲と要求されたタグに対する言語学的タグからなる配列を返します。

Declaration 宣言

func linguisticTags(in range: NSRange, 
             scheme: NSLinguisticTagScheme, 
            options: NSLinguisticTagger.Options = [], 
        orthography: NSOrthography?, 
        tokenRanges: AutoreleasingUnsafeMutablePointer<NSArray?>?) -> [NSLinguisticTag]

Parameters パラメータ

range

The range of the string to analyze. 分析する文字列の範囲。

tagScheme

The tag scheme to use. See Linguistic Tag Schemes for supported values. 使用するタグスキーム(タグ体系)。サポートされる値のためにLinguistic Tag Schemesを見てください。

opts

The linguistic tagger options to use. See NSLinguisticTagger.Options for the constants. These constants can be combined using the C-Bitwise OR operator. 使用する言語学的タガー(標識付け)オプション。NSLinguisticTagger.Optionsを定数のために見てください。これらの定数は、Cビット単位演算子を使って結合できます。

orthography

The orthography of the string. If nil, the linguistic tagger will attempt to determine the orthography from the string content. この文字列の正書法。nilならば、言語学的タガーは正書法を文字列の内容から決定しようと試みるでしょう。

tokenRanges

An array returned by-reference containing the token ranges of the linguistic tags wrapped in NSValue objects. 参照によって返されるある配列、NSValueオブジェクトの中にラップされる言語学的タグのトークン範囲を含んでいます。

Return Value 戻り値

Returns an array containing the linguistic tags for the tokenRanges within the receiving string. ある配列を返します、受け手側の文字列内のtokenRangesに対する言語学的タグを含んでいます。

Discussion 議論

This is a convenience method. It is the equivalent of creating an instance of NSLinguisticTagger, specifying the receiver as the string to be analyzed, and the orthography (or nil) and then invoking the NSLinguisticTagger method or linguisticTags(in:scheme:options:orthography:tokenRanges:). これは便宜メソッドです。それはNSLinguisticTaggerのインスタンスの作成を、レシーバを分析される文字列として、そして正書法(またはnil)を指定して行うこと、そしてそれからNSLinguisticTaggerのメソッドまたはlinguisticTags(in:scheme:options:orthography:tokenRanges:)を発動することと同等です。

See Also 参照

Performing Linguistic Analysis 言語的分析を実行する