JapanesePhoneticAnalyzer JapanesePhoneticAnalyzer JapanesePhoneticAnalyzer JapanesePhoneticAnalyzer JapanesePhoneticAnalyzer Class

Definition

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.

public : static class JapanesePhoneticAnalyzer
static struct winrt::Windows::Globalization::JapanesePhoneticAnalyzer
public static class JapanesePhoneticAnalyzer
Public Shared Class JapanesePhoneticAnalyzer
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Globalization.GlobalizationJapanesePhoneticAnalyzerContract (introduced v1)

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
@Windows.Globalization.JapanesePhoneme.DisplayText?text=DisplayText 今日いい天気です
@Windows.Globalization.JapanesePhoneme.YomiText?text=YomiText (reading)きょういいてんきです
@Windows.Globalization.JapanesePhoneme.IsPhraseStart?text=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.

Methods

GetWords(String) GetWords(String) GetWords(String) GetWords(String) 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) GetWords(String, Boolean) GetWords(String, Boolean) GetWords(String, Boolean) 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.

See also