Logo Lanfrica

Socret360/akara-android

Domaine:

natural language processing

Type de record:

software
Créateur:
Soc
Hôte:
The AKARA (អក្ខារា) project aims to give developers the power to easily add multi-language word suggestions support to their applications. AKARA Android brings this goal to life for Android developers. # AKARA Android - Multi-Language Word Suggestions Toolkit for Android The AKARA (អក្ខារា) project aims to give developers the power to easily add multi-language word suggestions support to their applications. AKARA Android brings this goal to life for Android developers. ## Language Support - [x] Khmer - [x] English ## Word Suggestions Approach # Installing ### Step 1. Add the JitPack repository to your build file ```gradle allprojects { repositories { ... maven { url 'jitpack.io' } } } ``` ### Step 2. Add the dependency ```gradle dependencies { implementation 'com.github.Socret360:akara-android:Tag' } ``` ### Step 3. Use the package ```Kotlin class MainActivity : AppCompatActivity() { lateinit var akara: Akara override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) akara = Akara(this) val sentence = "ឯងនេះមួយយប់ៗដេកខ្វល់រឿងអនាគតមិនដឹងធ្វើអីចិញ្ចឹមខ្លួនមួយនេះរស់" akara.suggest(input, object: OnSuggestionListener { override fun onCompleted( suggestionType: SuggestionType?, suggestions: List , sequences: List , words: List ) { Log.d(TAG, "input: $input") Log.d(TAG, "sequences: $sequences") Log.d(TAG, "words: $words") Log.d(TAG, "suggestions: ${suggestions.take(3)}") Log.d(TAG, "suggestion_type: $suggestionType") Log.d(TAG, "======") } override fun onError() { Log.d(TAG, "$input: Cannot provide suggestions") } }) } } ``` # Credits ### Sequence Breaker: - Using simple space splitting and MLKit Language Identification to determine sequence language. ### WordBreaker: - Khmer: Deep Learning (LSTM) based on Joint Khmer Word Segmentation and Part-of-Speech Tagging Using Deep Learning from github.com. - English: Simple space spliting. ### Auto Completion - Khmer: Prefix Tree (a.k.a Trie) with dictionaries from github.com. - English: Prefix Tree (a.k.a Trie) with dictionary from github.