Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #51 from friesenkiwi/Brazilian
Browse files Browse the repository at this point in the history
Brazilian language pack
  • Loading branch information
friesenkiwi authored Jul 9, 2017
2 parents ef68611 + c80d104 commit d5a95a1
Show file tree
Hide file tree
Showing 27 changed files with 170,127 additions and 32,728 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
.DS_Store
/build
/captures
/dictionary/words_from_aosp.xml
src/main/res/raw/*
src/main/res/values/words_dict_array.xml
LanguagePack-release.apk
46 changes: 16 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.anysoftkeyboard.tools.generatewordslist.GenerateWordsListFromAOSPTask
import com.anysoftkeyboard.tools.makedictionary.MakeDictionaryTask

buildscript {
repositories {
jcenter()
Expand All @@ -8,7 +11,6 @@ buildscript {

classpath 'com.github.AnySoftKeyboard.AnySoftKeyboardTools:makedictionary:99bd3e6'
classpath 'com.github.AnySoftKeyboard.AnySoftKeyboardTools:generatewordslist:99bd3e6'
//classpath files('english_dictionary/generatewordslist-1.0-SNAPSHOT.jar')
classpath 'org.jsoup:jsoup:1.9.1'
}
}
Expand All @@ -20,11 +22,11 @@ android {
buildToolsVersion '25.0.2'

defaultConfig {
applicationId "com.anysoftkeyboard.languagepack.languagepack"
applicationId "com.anysoftkeyboard.languagepack.brazilian"
minSdkVersion 7
targetSdkVersion 25
versionCode 1
versionName "1.0"
versionCode 100
versionName "2.0"
}

signingConfigs {
Expand All @@ -47,35 +49,20 @@ android {
}
}

task parseTextInputFiles(type: com.anysoftkeyboard.tools.generatewordslist.GenerateWordsListTask) {
inputFiles new File(project.getProjectDir(), "dictionary/NY_STATE_ASSEMBLY_TRANSCRIPT_20120621.txt"),
//Download the archive from https://dumps.wikimedia.org/other/static_html_dumps/current/simple/
new File(project.getProjectDir(), "dictionary/First_English_Civil_War_Wikipedia.htm")
outputWordsListFile new File(project.getProjectDir(), "dictionary/words_from_texts.xml")
}

//another option is to download the words-list from AOSP at https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/dictionaries/
//download the words-list from AOSP at https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/dictionaries/
//make sure that you are using an unzipped file. The XX_wordlist.combined file should be a plain text file.
task parseAospForEnglishDictionary(type: com.anysoftkeyboard.tools.generatewordslist.GenerateWordsListFromAOSPTask) {
inputFile new File(project.getProjectDir(), "dictionary/aosp_en_wordlist.combined")
task parseAospForDictionary(type: GenerateWordsListFromAOSPTask) {
inputFile new File(project.getProjectDir(), "dictionary/pt_BR_wordlist.combined")
outputWordsListFile new File(project.getProjectDir(), "dictionary/words_from_aosp.xml")
maxWordsInList 300000
}

task mergeAllWordLists(type: com.anysoftkeyboard.tools.generatewordslist.MergeWordsListTask) {
dependsOn parseTextInputFiles

inputWordsListFiles = [
new File(project.getProjectDir(), "dictionary/words_from_texts.xml"),
new File(project.getProjectDir(), "dictionary/popular_websites_words.xml"),//website I use most
] as File[]
outputWordsListFile new File(project.getProjectDir(), "dictionary/words_merged.xml")
maxWordsInList 100000
}

task makeDictionary(type: com.anysoftkeyboard.tools.makedictionary.MakeDictionaryTask) {
dependsOn mergeAllWordLists
inputWordsListFile new File(project.getProjectDir(), "dictionary/words_merged.xml")
task makeDictionary(type: MakeDictionaryTask) {
doFirst {
mkdir 'src/main/res/raw'
}
dependsOn parseAospForDictionary
inputWordsListFile new File(project.getProjectDir(), "dictionary/words_from_aosp.xml")
}

afterEvaluate { proj ->
Expand All @@ -92,5 +79,4 @@ dependencies {
maven { url "https://jitpack.io" }
}
compile 'com.github.AnySoftKeyboard:AnySoftKeyboard-API:1.7.0'
}

}
902 changes: 0 additions & 902 deletions dictionary/First_English_Civil_War_Wikipedia.htm

This file was deleted.

67 changes: 0 additions & 67 deletions dictionary/LICENSE_for_en_wikipedia.txt

This file was deleted.

Loading

0 comments on commit d5a95a1

Please sign in to comment.