commit d7fda83f2e089b5b02416039f42d436ecb074a98 Author: bernd32 Date: Fri Dec 13 16:52:18 2019 +0500 Initial commit diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..eb85c19 --- /dev/null +++ b/.classpath @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.project b/.project new file mode 100644 index 0000000..5345fd5 --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ + + + romaji-henkan + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..a6fee6f --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0b9cfa6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 bernd32 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/kuromoji-core-0.9.0.jar b/lib/kuromoji-core-0.9.0.jar new file mode 100644 index 0000000..6957657 Binary files /dev/null and b/lib/kuromoji-core-0.9.0.jar differ diff --git a/lib/kuromoji-ipadic-0.9.0.jar b/lib/kuromoji-ipadic-0.9.0.jar new file mode 100644 index 0000000..20a8a71 Binary files /dev/null and b/lib/kuromoji-ipadic-0.9.0.jar differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..53545d0 --- /dev/null +++ b/pom.xml @@ -0,0 +1,17 @@ + + 4.0.0 + com.bernd32 + romaji-henkan + 0.0.1 + romaji-henkan + A Java library to convert Japanese text to Latin alphabet (romanization) + + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.1 + + + + \ No newline at end of file diff --git a/src/main/java/com/bernd32/romajihenkan/ConversionTable.java b/src/main/java/com/bernd32/romajihenkan/ConversionTable.java new file mode 100644 index 0000000..2c29e08 --- /dev/null +++ b/src/main/java/com/bernd32/romajihenkan/ConversionTable.java @@ -0,0 +1,90 @@ +/* + * Copyright 2019 bernd32 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.bernd32.romajihenkan; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.util.Map; +import java.util.TreeMap; + +class ConversionTable { + + private static final String KANA_TO_ROMAJI_FILE = "/romaji_table.csv"; + private static ConversionTable kanaToRomajiTable; + + private Map conversionMap; + private int maxKeyLength; + + private ConversionTable(Map conversionMap) { + this.conversionMap = conversionMap; + + for (String key : conversionMap.keySet()) { + + if (key.length() > maxKeyLength) { + maxKeyLength = key.length(); + } + } + } + + int getMaxKeyLength() { + return maxKeyLength; + } + + String get(String key) { + return conversionMap.get(key); + } + + public static synchronized ConversionTable getKanaToRomaji() { + + if (kanaToRomajiTable == null) { + kanaToRomajiTable = createConversionTableFromResource(); + } + + return kanaToRomajiTable; + } + + private static ConversionTable createConversionTableFromResource() { + + URL resourceUrl = ConversionTable.class.getResource(ConversionTable.KANA_TO_ROMAJI_FILE); + + assert resourceUrl != null; + try (InputStream inputStream = resourceUrl.openStream()) { + + BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); + Map conversionMap = new TreeMap<>(); + + String line; + while ((line = reader.readLine()) != null) { + + int delimiterIndex = line.indexOf(','); + + String key = line.substring(0, delimiterIndex); + String value = line.substring(delimiterIndex + 1); + + conversionMap.put(key, value); + } + + return new ConversionTable(conversionMap); + + } catch (IOException exception) { + throw new RuntimeException(exception); + } + } +} diff --git a/src/main/java/com/bernd32/romajihenkan/ConvertToKana.java b/src/main/java/com/bernd32/romajihenkan/ConvertToKana.java new file mode 100644 index 0000000..85f5af0 --- /dev/null +++ b/src/main/java/com/bernd32/romajihenkan/ConvertToKana.java @@ -0,0 +1,80 @@ +/* + * Copyright 2019 bernd32 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.bernd32.romajihenkan; + +import com.atilika.kuromoji.ipadic.Token; +import com.atilika.kuromoji.ipadic.Tokenizer; + +import java.util.List; + +/* + * Convert string in Japanese to Katakana + */ + +class ConvertToKana { + + String convert(String text) { + Tokenizer tokenizer = new Tokenizer(); + List tokens = tokenizer.tokenize(text); + StringBuilder outputBuilder = new StringBuilder(); + + for (Token token : tokens) { + String reading = getReading(token); + String type = getType(token); + if (token.getSurface().charAt(0)=='\n') { + outputBuilder.append('\n'); + continue; + } + if (token.getSurface().equals(" ")) { + continue; // Skip whitespaces + } + if (hasNoReading(token)) { + //Don't convert tokens that don't have a reading + outputBuilder.append(token.getSurface()); + outputBuilder.append(" "); + continue; + } + if( token.getAllFeaturesArray()[0].equals("記号")) { + // Avoid double spaces + if(type.equals("空白") && getReading(token).equals(" ")) { + continue; + } + } + if (reading.endsWith("ッ")) { + // Do not append space after sokuon + outputBuilder.append(reading); + continue; + } + outputBuilder.append(reading); + outputBuilder.append(" "); + } + return outputBuilder.toString(); + } + + private boolean hasNoReading(Token token) { + return getReading(token).equals("*"); + } + + private String getReading(Token token) { + // Returns reading of Japanese word in token in katakana + return token.getAllFeaturesArray()[8]; + } + + private String getType(Token token) { + return token.getAllFeaturesArray()[1]; + } +} diff --git a/src/main/java/com/bernd32/romajihenkan/RomajiHenkan.java b/src/main/java/com/bernd32/romajihenkan/RomajiHenkan.java new file mode 100644 index 0000000..e963f7a --- /dev/null +++ b/src/main/java/com/bernd32/romajihenkan/RomajiHenkan.java @@ -0,0 +1,117 @@ +/* + * Copyright 2019 bernd32 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.bernd32.romajihenkan; + +public class RomajiHenkan { + + public String convert(String string) { + + ConvertToKana toKana = new ConvertToKana(); + string = toKana.convert(string); + string = replaceStringWithConversionTable(string, ConversionTable.getKanaToRomaji()); + string = replaceDashMarkerWithLongVowel(string); + string = replaceSokuonMarkersWithDoubleConsonant(string); + return string.trim(); + } + + private String replaceStringWithConversionTable(String string, ConversionTable conversionTable) { + StringBuilder resultBuilder = new StringBuilder(); + int i = 0; + while (i < string.length()) { + int maxSubstringLength = Math.min(conversionTable.getMaxKeyLength(), string.length() - i); + // Look-up the longest substring match. + for (int substringLength = maxSubstringLength; substringLength > 0; substringLength--) { + String substring = string.substring(i, i + substringLength); + String replacementString = conversionTable.get(substring); + // Replace substring if there's a match. + if (replacementString != null) { + resultBuilder.append(replacementString); + i += substring.length(); + break; + } + // Keep original character if no match found. + if (substringLength == 1) { + resultBuilder.append(substring); + i += 1; + break; + } + } + } + return resultBuilder.toString(); + } + + private String replaceSokuonMarkersWithDoubleConsonant(String string) { + StringBuilder resultBuilder = new StringBuilder(string); + for (int i = 0; i < string.length() - 1; i++) { + char currentCharacter = string.charAt(i); + char nextCharacter = string.charAt(i + 1); + boolean isSokuon = currentCharacter == 'ッ'; + if (isSokuon && isRomanConsonant(nextCharacter)) { + char replacementCharacter = nextCharacter == 'c' ? 't' : nextCharacter; + resultBuilder.deleteCharAt(i); + resultBuilder.insert(i, replacementCharacter); + } + } + return resultBuilder.toString(); + } + + /* + + private String replaceDashMarkerWithDoubleVowel(String string) { + StringBuilder resultBuilder = new StringBuilder(string); + for (int i = 1; i < string.length(); i++) { + char currentCharacter = string.charAt(i); + char previousCharacter = string.charAt(i - 1); + if (currentCharacter == '-' && isRomanVowel(previousCharacter)) { + resultBuilder.deleteCharAt(i); + resultBuilder.insert(i, previousCharacter); + } + } + return resultBuilder.toString(); + } + + */ + + private String replaceDashMarkerWithLongVowel(String string) { + String resultStr = string; + for (int i = 1; i < string.length(); i++) { + char currentCharacter = string.charAt(i); + char previousCharacter = string.charAt(i - 1); + if (currentCharacter == '-' && isRomanVowel(previousCharacter)) { + switch(previousCharacter) { + case 'a': resultStr = string.replace("a", "ā"); + case 'i': resultStr = string.replace("i", "ī"); + case 'u': resultStr = string.replace("u", "ū"); + case 'e': resultStr = string.replace("e", "ē"); + case 'o': resultStr = string.replace("o", "ō"); + } + } + } + resultStr = resultStr.replace("-", ""); + return resultStr; + } + + private static boolean isRomanConsonant(char character) { + return character >= 'a' && character <= 'z' && ! isRomanVowel(character); + } + + private static boolean isRomanVowel(char character) { + return character == 'a' || character == 'i' || character == 'u' || character == 'e' || character == 'o'; + } + + +} diff --git a/src/main/resources/romaji_table.csv b/src/main/resources/romaji_table.csv new file mode 100644 index 0000000..d916944 --- /dev/null +++ b/src/main/resources/romaji_table.csv @@ -0,0 +1,192 @@ +ア,a +イ,i +ウ,u +エ,e +オ,o +ー,- +ァ,xa +ィ,xi +ゥ,xu +ェ,xe +ォ,xo +カ,ka +キ,ki +ク,ku +ケ,ke +コ,ko +ガ,ga +ギ,gi +グ,gu +ゲ,ge +ゴ,go +サ,sa +シ,shi +ス,su +セ,se +ソ,so +ザ,za +ジ,ji +ズ,zu +ゼ,ze +ゾ,zo +ジャ,ja +ジュ,ju +ジェ,je +ジョ,jo +タ,ta +チ,chi +ツ,tsu +テ,te +ト,to +ダ,da +ヂ,dji +ヅ,dzu +デ,de +ド,do +ナ,na +ニ,ni +ヌ,nu +ネ,ne +ノ,no +ハ,ha +ヒ,hi +フ,fu +ヘ,he +ホ,ho +バ,ba +ビ,bi +ブ,bu +ベ,be +ボ,bo +パ,pa +ピ,pi +プ,pu +ペ,pe +ポ,po +ヴァ,va +ヴィ,vi +ヴ,vu +ヴェ,ve +ヴォ,vo +ファ,fa +フィ,fi +フェ,fe +フォ,fo +マ,ma +ミ,mi +ム,mu +メ,me +モ,mo +ヤ,ya +ユ,yu +イェ,ye +ヨ,yo +ラ,ra +リ,ri +ル,ru +レ,re +ロ,ro +ワ,wa +ヰ,wi +ヱ,we +ヲ,wo +ン,n +ヵ,xka +ヶ,ga +ヮ,xwa +ャ,xya +ュ,xyu +ョ,xyo +キャ,kya +キィ,kyi +キュ,kyu +キェ,kye +キョ,kyo +ギャ,gya +ギィ,gyi +ギュ,gyu +ギェ,gye +ギョ,gyo +シャ,sha +シィ,syi +シュ,shu +シェ,she +ショ,sho +ジィ,jyi +チャ,cha +チィ,cyi +チュ,chu +チェ,che +チョ,cho +テャ,tha +ティ,thi +テュ,thu +テェ,the +テョ,tho +ヂャ,dya +ヂィ,dyi +ヂュ,dyu +ヂェ,dye +ヂョ,dyo +デャ,dha +ディ,dhi +デュ,dhu +デェ,dhe +デョ,dho +ニャ,nya +ニィ,nyi +ニュ,nyu +ニェ,nye +ニョ,nyo +ヒャ,hya +ヒィ,hyi +ヒュ,hyu +ヒェ,hye +ヒョ,hyo +ビャ,bya +ビィ,byi +ビュ,byu +ビェ,bye +ビョ,byo +ピャ,pya +ピィ,pyi +ピュ,pyu +ピェ,pye +ピョ,pyo +ミャ,mya +ミィ,myi +ミュ,myu +ミェ,mye +ミョ,myo +リャ,lya +リィ,lyi +リュ,lyu +リェ,lye +リョ,lyo +−,- +゛," +゜,' +、,, +。,. +:,: + , +@,@ +(,( +),) + , +ンア,n'a +んあ,n'a +ンイ,n'i +んい,n'i +ンウ,n'u +んう,n'u +ンエ,n'e +んえ,n'e +ンオ,n'o +んお,n'o +ンヤ,n'ya +んや,n'ya +ンユ,n'yu +んゆ,n'yu +ンヨ,n'yo +んよ,n'yo diff --git a/src/test/java/com/bernd32/romajihenkan/ConvertToKanaTest.java b/src/test/java/com/bernd32/romajihenkan/ConvertToKanaTest.java new file mode 100644 index 0000000..09d8234 --- /dev/null +++ b/src/test/java/com/bernd32/romajihenkan/ConvertToKanaTest.java @@ -0,0 +1,43 @@ +package com.bernd32.romajihenkan; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; + +public class ConvertToKanaTest { + + RomajiHenkan henkan; + + @Before + public void setUp() throws Exception { + henkan = new RomajiHenkan(); + } + + @Test + public void geographyKanjiTesting() { + assertEquals("tōkyō", henkan.convert("東京")); + assertEquals("yokohama", henkan.convert("横浜")); + assertEquals("ōsaka", henkan.convert("大阪")); + assertEquals("nagoya", henkan.convert("名古屋")); + } + + @Test + public void sentenceTesting() { + assertEquals("bijinesu meru nadō de kekku ni mōchiiru hyōgen", + henkan.convert("ビジネスメールなどで結句に用いる表現")); + assertEquals("tanomi ni kotae te morau kansha no kimochi wo arawasu baai", + henkan.convert("頼みに答えてもらう感謝の気持ちを表す場合")); + assertEquals("kaigai zaiju nō yujin kara meru wō uketōtta baai nadō ni , renraku wō kure ta kōtō nitaishite ōrei wō iu baai", + henkan.convert("海外在住の友人からメールを受け取った場合などに、連絡をくれたことに対してお礼を言う場合")); + assertEquals("jikō shōkai nō saigō ni sōeru aisatsu tōshite tsukau hyōgen", + henkan.convert("自己紹介の最後に添える挨拶として使う表現")); + } + + @Test + public void sokuonTesting() { + assertEquals("ratte", henkan.convert("ラッテ")); + assertEquals("ko nakatta", henkan.convert("来なかった")); + } + +} diff --git a/src/test/resources/romaji_table.csv b/src/test/resources/romaji_table.csv new file mode 100644 index 0000000..9b7977c --- /dev/null +++ b/src/test/resources/romaji_table.csv @@ -0,0 +1,192 @@ +ア,a +イ,i +ウ,u +エ,e +オ,o +ー,- +ァ,xa +ィ,xi +ゥ,xu +ェ,xe +ォ,xo +カ,ka +キ,ki +ク,ku +ケ,ke +コ,ko +ガ,ga +ギ,gi +グ,gu +ゲ,ge +ゴ,go +サ,sa +シ,shi +ス,su +セ,se +ソ,so +ザ,za +ジ,ji +ズ,zu +ゼ,ze +ゾ,zo +ジャ,ja +ジュ,ju +ジェ,je +ジョ,jo +タ,ta +チ,chi +ツ,tsu +テ,te +ト,to +ダ,da +ヂ,dji +ヅ,dzu +デ,de +ド,do +ナ,na +ニ,ni +ヌ,nu +ネ,ne +ノ,no +ハ,ha +ヒ,hi +フ,fu +ヘ,he +ホ,ho +バ,ba +ビ,bi +ブ,bu +ベ,be +ボ,bo +パ,pa +ピ,pi +プ,pu +ペ,pe +ポ,po +ヴァ,va +ヴィ,vi +ヴ,vu +ヴェ,ve +ヴォ,vo +ファ,fa +フィ,fi +フェ,fe +フォ,fo +マ,ma +ミ,mi +ム,mu +メ,me +モ,mo +ヤ,ya +ユ,yu +イェ,ye +ヨ,yo +ラ,ra +リ,ri +ル,ru +レ,re +ロ,ro +ワ,wa +ヰ,wi +ヱ,we +ヲ,wo +ン,n +ヵ,xka +ヶ,ga +ヮ,xwa +ャ,xya +ュ,xyu +ョ,xyo +キャ,kya +キィ,kyi +キュ,kyu +キェ,kye +キョ,kyo +ギャ,gya +ギィ,gyi +ギュ,gyu +ギェ,gye +ギョ,gyo +シャ,sha +シィ,syi +シュ,shu +シェ,she +ショ,sho +ジィ,jyi +チャ,cha +チィ,cyi +チュ,chu +チェ,che +チョ,cho +テャ,tha +ティ,thi +テュ,thu +テェ,the +テョ,tho +ヂャ,dya +ヂィ,dyi +ヂュ,dyu +ヂェ,dye +ヂョ,dyo +デャ,dha +ディ,dhi +デュ,dhu +デェ,dhe +デョ,dho +ニャ,nya +ニィ,nyi +ニュ,nyu +ニェ,nye +ニョ,nyo +ヒャ,hya +ヒィ,hyi +ヒュ,hyu +ヒェ,hye +ヒョ,hyo +ビャ,bya +ビィ,byi +ビュ,byu +ビェ,bye +ビョ,byo +ピャ,pya +ピィ,pyi +ピュ,pyu +ピェ,pye +ピョ,pyo +ミャ,mya +ミィ,myi +ミュ,myu +ミェ,mye +ミョ,myo +リャ,lya +リィ,lyi +リュ,lyu +リェ,lye +リョ,lyo +・,  +−,- +゛,"゜,' +、,, +。,. +:,: + , +@,@ +(,( +),) + , +ンア,n'a +んあ,n'a +ンイ,n'i +んい,n'i +ンウ,n'u +んう,n'u +ンエ,n'e +んえ,n'e +ンオ,n'o +んお,n'o +ンヤ,n'ya +んや,n'ya +ンユ,n'yu +んゆ,n'yu +ンヨ,n'yo +んよ,n'yo" diff --git a/target/classes/com/bernd32/romajihenkan/ConversionTable.class b/target/classes/com/bernd32/romajihenkan/ConversionTable.class new file mode 100644 index 0000000..fba3106 Binary files /dev/null and b/target/classes/com/bernd32/romajihenkan/ConversionTable.class differ diff --git a/target/classes/com/bernd32/romajihenkan/ConvertToKana.class b/target/classes/com/bernd32/romajihenkan/ConvertToKana.class new file mode 100644 index 0000000..ceb756b Binary files /dev/null and b/target/classes/com/bernd32/romajihenkan/ConvertToKana.class differ diff --git a/target/classes/com/bernd32/romajihenkan/RomajiHenkan.class b/target/classes/com/bernd32/romajihenkan/RomajiHenkan.class new file mode 100644 index 0000000..71074ab Binary files /dev/null and b/target/classes/com/bernd32/romajihenkan/RomajiHenkan.class differ diff --git a/target/classes/romaji_table.csv b/target/classes/romaji_table.csv new file mode 100644 index 0000000..d916944 --- /dev/null +++ b/target/classes/romaji_table.csv @@ -0,0 +1,192 @@ +ア,a +イ,i +ウ,u +エ,e +オ,o +ー,- +ァ,xa +ィ,xi +ゥ,xu +ェ,xe +ォ,xo +カ,ka +キ,ki +ク,ku +ケ,ke +コ,ko +ガ,ga +ギ,gi +グ,gu +ゲ,ge +ゴ,go +サ,sa +シ,shi +ス,su +セ,se +ソ,so +ザ,za +ジ,ji +ズ,zu +ゼ,ze +ゾ,zo +ジャ,ja +ジュ,ju +ジェ,je +ジョ,jo +タ,ta +チ,chi +ツ,tsu +テ,te +ト,to +ダ,da +ヂ,dji +ヅ,dzu +デ,de +ド,do +ナ,na +ニ,ni +ヌ,nu +ネ,ne +ノ,no +ハ,ha +ヒ,hi +フ,fu +ヘ,he +ホ,ho +バ,ba +ビ,bi +ブ,bu +ベ,be +ボ,bo +パ,pa +ピ,pi +プ,pu +ペ,pe +ポ,po +ヴァ,va +ヴィ,vi +ヴ,vu +ヴェ,ve +ヴォ,vo +ファ,fa +フィ,fi +フェ,fe +フォ,fo +マ,ma +ミ,mi +ム,mu +メ,me +モ,mo +ヤ,ya +ユ,yu +イェ,ye +ヨ,yo +ラ,ra +リ,ri +ル,ru +レ,re +ロ,ro +ワ,wa +ヰ,wi +ヱ,we +ヲ,wo +ン,n +ヵ,xka +ヶ,ga +ヮ,xwa +ャ,xya +ュ,xyu +ョ,xyo +キャ,kya +キィ,kyi +キュ,kyu +キェ,kye +キョ,kyo +ギャ,gya +ギィ,gyi +ギュ,gyu +ギェ,gye +ギョ,gyo +シャ,sha +シィ,syi +シュ,shu +シェ,she +ショ,sho +ジィ,jyi +チャ,cha +チィ,cyi +チュ,chu +チェ,che +チョ,cho +テャ,tha +ティ,thi +テュ,thu +テェ,the +テョ,tho +ヂャ,dya +ヂィ,dyi +ヂュ,dyu +ヂェ,dye +ヂョ,dyo +デャ,dha +ディ,dhi +デュ,dhu +デェ,dhe +デョ,dho +ニャ,nya +ニィ,nyi +ニュ,nyu +ニェ,nye +ニョ,nyo +ヒャ,hya +ヒィ,hyi +ヒュ,hyu +ヒェ,hye +ヒョ,hyo +ビャ,bya +ビィ,byi +ビュ,byu +ビェ,bye +ビョ,byo +ピャ,pya +ピィ,pyi +ピュ,pyu +ピェ,pye +ピョ,pyo +ミャ,mya +ミィ,myi +ミュ,myu +ミェ,mye +ミョ,myo +リャ,lya +リィ,lyi +リュ,lyu +リェ,lye +リョ,lyo +−,- +゛," +゜,' +、,, +。,. +:,: + , +@,@ +(,( +),) + , +ンア,n'a +んあ,n'a +ンイ,n'i +んい,n'i +ンウ,n'u +んう,n'u +ンエ,n'e +んえ,n'e +ンオ,n'o +んお,n'o +ンヤ,n'ya +んや,n'ya +ンユ,n'yu +んゆ,n'yu +ンヨ,n'yo +んよ,n'yo diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 0000000..c0563e9 --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Fri Dec 13 16:14:24 PKT 2019 +version=0.0.1 +groupId=com.bernd32 +artifactId=romaji-henkan diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..1ee8049 --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,3 @@ +C:\Users\misak\eclipse-workspace\romaji-henkan\src\main\java\com\bernd32\romajihenkan\ConversionTable.java +C:\Users\misak\eclipse-workspace\romaji-henkan\src\main\java\com\bernd32\romajihenkan\ConvertToKana.java +C:\Users\misak\eclipse-workspace\romaji-henkan\src\main\java\com\bernd32\romajihenkan\RomajiHenkan.java diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..5dfdc56 --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1 @@ +C:\Users\misak\eclipse-workspace\romaji-henkan\src\test\java\com\bernd32\romajihenkan\ConvertToKanaTest.java diff --git a/target/original-romaji-henkan-0.0.1.jar b/target/original-romaji-henkan-0.0.1.jar new file mode 100644 index 0000000..09bf1e1 Binary files /dev/null and b/target/original-romaji-henkan-0.0.1.jar differ diff --git a/target/romaji-henkan-0.0.1.jar b/target/romaji-henkan-0.0.1.jar new file mode 100644 index 0000000..7a70b98 Binary files /dev/null and b/target/romaji-henkan-0.0.1.jar differ diff --git a/target/surefire-reports/TEST-com.bernd32.romajihenkan.ConvertToKanaTest.xml b/target/surefire-reports/TEST-com.bernd32.romajihenkan.ConvertToKanaTest.xml new file mode 100644 index 0000000..6f2b797 --- /dev/null +++ b/target/surefire-reports/TEST-com.bernd32.romajihenkan.ConvertToKanaTest.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/target/surefire-reports/com.bernd32.romajihenkan.ConvertToKanaTest.txt b/target/surefire-reports/com.bernd32.romajihenkan.ConvertToKanaTest.txt new file mode 100644 index 0000000..dfc3967 --- /dev/null +++ b/target/surefire-reports/com.bernd32.romajihenkan.ConvertToKanaTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: com.bernd32.romajihenkan.ConvertToKanaTest +------------------------------------------------------------------------------- +Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec diff --git a/target/test-classes/com/bernd32/romajihenkan/ConvertToKanaTest.class b/target/test-classes/com/bernd32/romajihenkan/ConvertToKanaTest.class new file mode 100644 index 0000000..584300f Binary files /dev/null and b/target/test-classes/com/bernd32/romajihenkan/ConvertToKanaTest.class differ diff --git a/target/test-classes/romaji_table.csv b/target/test-classes/romaji_table.csv new file mode 100644 index 0000000..9b7977c --- /dev/null +++ b/target/test-classes/romaji_table.csv @@ -0,0 +1,192 @@ +ア,a +イ,i +ウ,u +エ,e +オ,o +ー,- +ァ,xa +ィ,xi +ゥ,xu +ェ,xe +ォ,xo +カ,ka +キ,ki +ク,ku +ケ,ke +コ,ko +ガ,ga +ギ,gi +グ,gu +ゲ,ge +ゴ,go +サ,sa +シ,shi +ス,su +セ,se +ソ,so +ザ,za +ジ,ji +ズ,zu +ゼ,ze +ゾ,zo +ジャ,ja +ジュ,ju +ジェ,je +ジョ,jo +タ,ta +チ,chi +ツ,tsu +テ,te +ト,to +ダ,da +ヂ,dji +ヅ,dzu +デ,de +ド,do +ナ,na +ニ,ni +ヌ,nu +ネ,ne +ノ,no +ハ,ha +ヒ,hi +フ,fu +ヘ,he +ホ,ho +バ,ba +ビ,bi +ブ,bu +ベ,be +ボ,bo +パ,pa +ピ,pi +プ,pu +ペ,pe +ポ,po +ヴァ,va +ヴィ,vi +ヴ,vu +ヴェ,ve +ヴォ,vo +ファ,fa +フィ,fi +フェ,fe +フォ,fo +マ,ma +ミ,mi +ム,mu +メ,me +モ,mo +ヤ,ya +ユ,yu +イェ,ye +ヨ,yo +ラ,ra +リ,ri +ル,ru +レ,re +ロ,ro +ワ,wa +ヰ,wi +ヱ,we +ヲ,wo +ン,n +ヵ,xka +ヶ,ga +ヮ,xwa +ャ,xya +ュ,xyu +ョ,xyo +キャ,kya +キィ,kyi +キュ,kyu +キェ,kye +キョ,kyo +ギャ,gya +ギィ,gyi +ギュ,gyu +ギェ,gye +ギョ,gyo +シャ,sha +シィ,syi +シュ,shu +シェ,she +ショ,sho +ジィ,jyi +チャ,cha +チィ,cyi +チュ,chu +チェ,che +チョ,cho +テャ,tha +ティ,thi +テュ,thu +テェ,the +テョ,tho +ヂャ,dya +ヂィ,dyi +ヂュ,dyu +ヂェ,dye +ヂョ,dyo +デャ,dha +ディ,dhi +デュ,dhu +デェ,dhe +デョ,dho +ニャ,nya +ニィ,nyi +ニュ,nyu +ニェ,nye +ニョ,nyo +ヒャ,hya +ヒィ,hyi +ヒュ,hyu +ヒェ,hye +ヒョ,hyo +ビャ,bya +ビィ,byi +ビュ,byu +ビェ,bye +ビョ,byo +ピャ,pya +ピィ,pyi +ピュ,pyu +ピェ,pye +ピョ,pyo +ミャ,mya +ミィ,myi +ミュ,myu +ミェ,mye +ミョ,myo +リャ,lya +リィ,lyi +リュ,lyu +リェ,lye +リョ,lyo +・,  +−,- +゛,"゜,' +、,, +。,. +:,: + , +@,@ +(,( +),) + , +ンア,n'a +んあ,n'a +ンイ,n'i +んい,n'i +ンウ,n'u +んう,n'u +ンエ,n'e +んえ,n'e +ンオ,n'o +んお,n'o +ンヤ,n'ya +んや,n'ya +ンユ,n'yu +んゆ,n'yu +ンヨ,n'yo +んよ,n'yo"