-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I could be doing things incorrectly but i am trying to basically do 2 things given almost any imput in a japanese text field.
- Convert to Kana
- Convert to Romaji
The Romaji conversion is thowing a heap of erorrs most of the time like the one below from a unit test.
[Theory]
[InlineData("袖ケ浦港運", "Sodegaura-kō un")]
public async Task RomajiTransliterationTest(string input, string expectedOutput)
{
KawazuConverter converter = new();
var output = await converter.Convert(input, To.Romaji, Mode.Okurigana, RomajiSystem.Hepburn);
Assert.Equal(expectedOutput, output);
}
System.ArgumentOutOfRangeException: Length cannot be less than zero. (Parameter 'length')
at System.Text.StringBuilder.ToString(Int32 startIndex, Int32 length)
at Kawazu.Division..ctor(MeCabIpaDicNode node, TextType type, RomajiSystem system)
at Kawazu.KawazuConverter.<>c__DisplayClass6_0.<Convert>b__1(MeCabIpaDicNode node)
at System.Linq.Enumerable.SelectArrayIterator`2.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Kawazu.KawazuConverter.<>c__DisplayClass6_0.<Convert>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels