Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TextClassifier

 TextClassifier

TextClassifier

TextClassifier-Sample
https://github.com/operando/TextClassifier-Sample

Shibuya.apk #34 - Report from Google I/O 2019
https://shibuya-apk.connpass.com/event/128668/

operandoOS

May 17, 2019
Tweet

More Decks by operandoOS

Other Decks in Technology

Transcript

  1. Smart Linkify • Android P͔Β • TextClassifierΛར༻ͯ͠Δ • https://developer.android.com/about/versions/pie/ android-9.0#text

    • Smart Text SelectionͷਐԽ൛ʁ • https://www.youtube.com/watch? v=Y2VF8tmLFHw&t=4832
  2. Smart Linkifyͷৄࡉ • The Machine Learning Behind Android Smart Linkify

    • https://ai.googleblog.com/2018/08/the- machine-learning-behind-android.html
  3. TextSelection GlobalScope.launch(Dispatchers.Main) { val tcm = getSystemService(TextClassificationManager::class.java) val ts: TextSelection

    = async { tcm.textClassifier.suggestSelection( TextSelection.Request.Builder( "GoogleͷαΠτURL:https://google.com" ,21,32).build()) }.await() findViewById<TextView>(R.id.result).text = ts.toString() }
  4. TextLanguage GlobalScope.launch { val tcm = getSystemService( TextClassificationManager::class.java) val tlr

    = TextLanguage.Request.Builder(text).build() val textLanguage = async { tcm.textClassifier.detectLanguage(tlr) }.await() findViewById<TextView>(R.id.result).text = textLanguage.toString() }
  5. TextLanguage GlobalScope.launch { val tcm = getSystemService (TextClassificationManager::class.java) val tlr

    = TextLanguage.Request.Builder(text).build() val textLanguage = async { tcm.textClassifier.detectLanguage(tlr) }.await() val s = textLanguage.getConfidenceScore( ULocale.JAPANESE) }