Initial commit
This commit is contained in:
commit
d7fda83f2e
41
.classpath
Normal file
41
.classpath
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/kuromoji-core-0.9.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/kuromoji-ipadic-0.9.0.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
23
.project
Normal file
23
.project
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>romaji-henkan</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
16
.settings/org.eclipse.jdt.core.prefs
Normal file
16
.settings/org.eclipse.jdt.core.prefs
Normal file
@ -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
|
4
.settings/org.eclipse.m2e.core.prefs
Normal file
4
.settings/org.eclipse.m2e.core.prefs
Normal file
@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -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.
|
BIN
lib/kuromoji-core-0.9.0.jar
Normal file
BIN
lib/kuromoji-core-0.9.0.jar
Normal file
Binary file not shown.
BIN
lib/kuromoji-ipadic-0.9.0.jar
Normal file
BIN
lib/kuromoji-ipadic-0.9.0.jar
Normal file
Binary file not shown.
17
pom.xml
Normal file
17
pom.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.bernd32</groupId>
|
||||
<artifactId>romaji-henkan</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<name>romaji-henkan</name>
|
||||
<description>A Java library to convert Japanese text to Latin alphabet (romanization)</description>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
90
src/main/java/com/bernd32/romajihenkan/ConversionTable.java
Normal file
90
src/main/java/com/bernd32/romajihenkan/ConversionTable.java
Normal file
@ -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<String, String> conversionMap;
|
||||
private int maxKeyLength;
|
||||
|
||||
private ConversionTable(Map<String, String> 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<String, String> 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);
|
||||
}
|
||||
}
|
||||
}
|
80
src/main/java/com/bernd32/romajihenkan/ConvertToKana.java
Normal file
80
src/main/java/com/bernd32/romajihenkan/ConvertToKana.java
Normal file
@ -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<Token> 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];
|
||||
}
|
||||
}
|
117
src/main/java/com/bernd32/romajihenkan/RomajiHenkan.java
Normal file
117
src/main/java/com/bernd32/romajihenkan/RomajiHenkan.java
Normal file
@ -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';
|
||||
}
|
||||
|
||||
|
||||
}
|
192
src/main/resources/romaji_table.csv
Normal file
192
src/main/resources/romaji_table.csv
Normal file
@ -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
|
Can't render this file because it contains an unexpected character in line 192 and column 13.
|
@ -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("来なかった"));
|
||||
}
|
||||
|
||||
}
|
192
src/test/resources/romaji_table.csv
Normal file
192
src/test/resources/romaji_table.csv
Normal file
@ -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"
|
|
BIN
target/classes/com/bernd32/romajihenkan/ConversionTable.class
Normal file
BIN
target/classes/com/bernd32/romajihenkan/ConversionTable.class
Normal file
Binary file not shown.
BIN
target/classes/com/bernd32/romajihenkan/ConvertToKana.class
Normal file
BIN
target/classes/com/bernd32/romajihenkan/ConvertToKana.class
Normal file
Binary file not shown.
BIN
target/classes/com/bernd32/romajihenkan/RomajiHenkan.class
Normal file
BIN
target/classes/com/bernd32/romajihenkan/RomajiHenkan.class
Normal file
Binary file not shown.
192
target/classes/romaji_table.csv
Normal file
192
target/classes/romaji_table.csv
Normal file
@ -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
|
Can't render this file because it contains an unexpected character in line 192 and column 13.
|
5
target/maven-archiver/pom.properties
Normal file
5
target/maven-archiver/pom.properties
Normal file
@ -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
|
@ -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
|
@ -0,0 +1 @@
|
||||
C:\Users\misak\eclipse-workspace\romaji-henkan\src\test\java\com\bernd32\romajihenkan\ConvertToKanaTest.java
|
BIN
target/original-romaji-henkan-0.0.1.jar
Normal file
BIN
target/original-romaji-henkan-0.0.1.jar
Normal file
Binary file not shown.
BIN
target/romaji-henkan-0.0.1.jar
Normal file
BIN
target/romaji-henkan-0.0.1.jar
Normal file
Binary file not shown.
@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite tests="0" failures="0" name="com.bernd32.romajihenkan.ConvertToKanaTest" time="0" errors="0" skipped="0">
|
||||
<properties>
|
||||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
||||
<property name="sun.boot.library.path" value="C:\Program Files\Java\jre1.8.0_221\bin"/>
|
||||
<property name="java.vm.version" value="25.221-b11"/>
|
||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.multiModuleProjectDirectory" value="C:\Users\misak\eclipse-workspace\romaji-henkan"/>
|
||||
<property name="java.vendor.url" value="http://java.oracle.com/"/>
|
||||
<property name="path.separator" value=";"/>
|
||||
<property name="guice.disable.misplaced.annotation.check" value="true"/>
|
||||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
||||
<property name="file.encoding.pkg" value="sun.io"/>
|
||||
<property name="user.script" value=""/>
|
||||
<property name="user.country" value="RU"/>
|
||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
||||
<property name="sun.os.patch.level" value=""/>
|
||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
||||
<property name="user.dir" value="C:\Users\misak\eclipse-workspace\romaji-henkan"/>
|
||||
<property name="java.runtime.version" value="1.8.0_221-b11"/>
|
||||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
||||
<property name="java.endorsed.dirs" value="C:\Program Files\Java\jre1.8.0_221\lib\endorsed"/>
|
||||
<property name="os.arch" value="amd64"/>
|
||||
<property name="java.io.tmpdir" value="C:\Users\misak\AppData\Local\Temp\"/>
|
||||
<property name="line.separator" value="
|
||||
"/>
|
||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.variant" value=""/>
|
||||
<property name="os.name" value="Windows 10"/>
|
||||
<property name="classworlds.conf" value="C:\Users\misak\eclipse-workspace\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf2766462247688400970.tmp"/>
|
||||
<property name="sun.jnu.encoding" value="MS932"/>
|
||||
<property name="java.library.path" value="C:\Program Files\Java\jre1.8.0_221\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_221/bin/server;C:/Program Files/Java/jre1.8.0_221/bin;C:/Program Files/Java/jre1.8.0_221/lib/amd64;C:\Program Files\Java\jre1.8.0_221\bin;C:\Python35\Lib\site-packages\PyQt5;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\PuTTY\;C:\Users\misak\AppData\Local\Programs\Python\Python36;C:\Users\misak\AppData\Local\Programs\Python\Python36\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Calibre2\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Users\misak\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\misak\AppData\Local\Programs\Python\Python36\;C:\Users\misak\AppData\Local\Microsoft\WindowsApps;C:\portable\ffmpeg\bin;C:\portable\youtube-dl;C:\Users\misak\AppData\Local\GitHubDesktop\bin;C:\Users\misak\AppData\Local\GitHubDesktop\app-2.1.0\resources\app\git\cmd;C:\portable\apache-maven-3.6.3\bin;;C:\WINDOWS\system32;;."/>
|
||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
||||
<property name="java.class.version" value="52.0"/>
|
||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
||||
<property name="os.version" value="10.0"/>
|
||||
<property name="user.home" value="C:\Users\misak"/>
|
||||
<property name="user.timezone" value="Asia/Karachi"/>
|
||||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
||||
<property name="java.specification.version" value="1.8"/>
|
||||
<property name="file.encoding" value="UTF-8"/>
|
||||
<property name="user.name" value="misak"/>
|
||||
<property name="java.class.path" value="C:\Users\misak\.p2\pool\plugins\org.eclipse.m2e.maven.runtime_1.12.0.20190529-1915\jars\plexus-classworlds-2.6.0.jar"/>
|
||||
<property name="java.vm.specification.version" value="1.8"/>
|
||||
<property name="sun.arch.data.model" value="64"/>
|
||||
<property name="java.home" value="C:\Program Files\Java\jre1.8.0_221"/>
|
||||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B package shade:shade"/>
|
||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.language" value="ru"/>
|
||||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
||||
<property name="java.vm.info" value="mixed mode"/>
|
||||
<property name="java.version" value="1.8.0_221"/>
|
||||
<property name="java.ext.dirs" value="C:\Program Files\Java\jre1.8.0_221\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
|
||||
<property name="sun.boot.class.path" value="C:\Program Files\Java\jre1.8.0_221\lib\resources.jar;C:\Program Files\Java\jre1.8.0_221\lib\rt.jar;C:\Program Files\Java\jre1.8.0_221\lib\sunrsasign.jar;C:\Program Files\Java\jre1.8.0_221\lib\jsse.jar;C:\Program Files\Java\jre1.8.0_221\lib\jce.jar;C:\Program Files\Java\jre1.8.0_221\lib\charsets.jar;C:\Program Files\Java\jre1.8.0_221\lib\jfr.jar;C:\Program Files\Java\jre1.8.0_221\classes"/>
|
||||
<property name="java.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.home" value="C:\Users\misak\eclipse-workspace\romaji-henkan\EMBEDDED"/>
|
||||
<property name="file.separator" value="\"/>
|
||||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
||||
<property name="sun.cpu.endian" value="little"/>
|
||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
||||
<property name="sun.desktop" value="windows"/>
|
||||
<property name="sun.cpu.isalist" value="amd64"/>
|
||||
</properties>
|
||||
</testsuite>
|
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.bernd32.romajihenkan.ConvertToKanaTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
|
Binary file not shown.
192
target/test-classes/romaji_table.csv
Normal file
192
target/test-classes/romaji_table.csv
Normal file
@ -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"
|
|
Loading…
Reference in New Issue
Block a user