Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/target
/language-detector.iml
.idea/
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
51 changes: 51 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* This build file was auto generated by running the Gradle 'init' task
* by 'eclectice' at '04/10/2016 11:37' with Gradle 2.14.1
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/2.14.1/userguide/tutorial_java_projects.html
*/

// Apply the java plugin to add support for Java
apply plugin: 'java'


tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:-deprecation" << "-Xlint:unchecked"
}

// In this section you declare where to find the dependencies of your project
repositories {
// Use 'jcenter' for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}

// In this section you declare the dependencies for your production and test code
dependencies {
// The production code uses the SLF4J logging API at compile time
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'org.jetbrains:annotations:15.0'
compile 'com.google.guava:guava:19.0'
compile 'net.arnx:jsonic:1.3.10'

// Declare the dependency for your favourite test framework you want to use in your tests.
// TestNG is also supported by the Gradle Test task. Just change the
// testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
// 'test.useTestNG()' to your build script.
testCompile 'junit:junit:4.12'
testCompile 'org.testng:testng:6.9.13.8'
testCompile 'junit:junit-dep:4.11'
testCompile 'org.hamcrest:hamcrest-core:1.4-atlassian-1'
testCompile 'org.hamcrest:hamcrest-library:1.4-atlassian-1'
testCompile 'org.mockito:mockito-core:2.1.0'
testCompile 'ch.qos.logback:logback-classic:1.1.7'
}

test {
//useJUnit() // enable this to test JUnit test classes
useTestNG() // enable this to test TestNG test classes
//systemProperty "file.encoding", "utf-8"
}
160 changes: 160 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 90 additions & 0 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* This settings file was auto generated by the Gradle buildInit task
* by 'eclectice' at '04/10/2016 11:37' with Gradle 2.14.1
*
* The settings file is used to specify which projects to include in your build.
* In a single project build this file can be empty or even removed.
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user guide at https://docs.gradle.org/2.14.1/userguide/multi_project_builds.html
*/

/*
// To declare projects as part of a multi-project build use the 'include' method
include 'shared'
include 'api'
include 'services:webservice'
*/

rootProject.name = 'language-detector'
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,55 @@ public class BuiltInLanguages {

static {
List<String> texts = new ArrayList<>();

texts.add("ar");
texts.add("bg");
texts.add("bn");
texts.add("ca");
texts.add("cs");
texts.add("da");
texts.add("de");
texts.add("el");
texts.add("en");
texts.add("es");
texts.add("et");
texts.add("fa");
texts.add("fi");
texts.add("fr");
texts.add("gu");
texts.add("he");
texts.add("hi");
texts.add("hr");
texts.add("hu");
texts.add("id");
texts.add("it");
texts.add("ja");
texts.add("ko");
texts.add("lt");
texts.add("lv");
texts.add("mk");
texts.add("ml");
texts.add("nl");
texts.add("no");
texts.add("pa");
texts.add("pl");
texts.add("pt");
texts.add("ro");
texts.add("ru");
texts.add("si");
texts.add("sq");
texts.add("sv");
texts.add("ta");
texts.add("te");
texts.add("th");
texts.add("tl");
texts.add("tr");
texts.add("uk");
texts.add("ur");
texts.add("vi");
texts.add("zh-cn");
texts.add("zh-tw");

shortTextLanguages = ImmutableList.copyOf(texts);
}

Expand Down
Loading