JapanesePhoneticAnalyzer class

Applies to Windows only

Reads a Japanese string that is a combination of Kanji characters and Hiragana characters, and returns a collection of proper readings from the string with word breaks.

Syntax


public static class JapanesePhoneticAnalyzer

Attributes

[MarshalingBehavior(Standard)]
[Threading(STA)]
[Version(0x06030000)]

Members

The JapanesePhoneticAnalyzer class has these types of members:

Methods

The JapanesePhoneticAnalyzer class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
GetWords(String) Reads a Japanese string that is a combination of Kanji characters and Hiragana characters, and returns a collection of proper readings from the string with word breaks.
GetWords(String,Boolean) Reads a Japanese string that is a combination of Kanji characters and Hiragana characters, and returns a collection of proper readings from the string with word breaks. Optionally uses the Mono Ruby strategy in breaking multi-Kanji words into multiple Kanji words.

 

Remarks

Analyzing Japanese strings and generating readings and word breaks is not a straightforward task, as one Kanji character can be read in multiple ways depending on context. Japanese strings also don't have explicit word breaks such as whitespace. JapanesePhoneticAnalyzer breaks an input string into an IVectorView of JapanesePhoneme objects.

Each JapanesePhoneme object represents a single Japanese word, and has properties for its display, its "reading" (the pronunciation of the display string, represented by a sequence of Hiragana characters), and whether or not it is the start of a phrase.

Example

When the method JapanesePhoneticAnalyzer.GetWords(input) analyzes the string "今日はいい天気です", it returns a vector of JapanesePhoneme with these properties:

01234
DisplayText 今日いい天気です
YomiText (reading)きょういいてんきです
IsPhraseStart truefalsetruetruefalse

 

You can also use the method overload JapanesePhoneticAnalyzer.GetWords(input, monoRuby) to specify the use of a word-breaking strategy called "Mono Ruby", which more aggressively attempts to break multi-Kanji words into multiple Kanji words. In the above example, using Mono Ruby, "天気" is further broken into "天" and "気". However, "今日" still remains unbroken due to the nature of the Japanese language.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

Windows.Globalization
Windows::Globalization [C++]

Metadata

Windows.winmd

See also

JapanesePhoneme
Object

 

 

Show:
© 2014 Microsoft