Mobile App Natural Language Processing Implementation

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Mobile App Natural Language Processing Implementation
Complex
~1-2 weeks
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Natural Language Processing Implementation in Mobile Applications

NLP on mobile is not one task but several fundamentally different ones: text classification, entity extraction (NER), sentiment analysis, summarization, machine translation. Each solved with different tools with different resource requirements.

Platform NLP APIs

Start with what's already on device — free on resources and works offline.

iOS — NaturalLanguage framework:

import NaturalLanguage

// Language identification
let recognizer = NLLanguageRecognizer()
recognizer.processString("Hello, how are you?")
let language = recognizer.dominantLanguage // .english

// Tokenization
let tokenizer = NLTokenizer(unit: .word)
tokenizer.string = text
tokenizer.enumerateTokens(in: text.startIndex..<text.endIndex) { range, _ in
    print(String(text[range]))
    return true
}

// Sentiment analysis
let tagger = NLTagger(tagSchemes: [.sentimentScore])
tagger.string = text
let (sentiment, _) = tagger.tag(at: text.startIndex,
                                  unit: .paragraph,
                                  scheme: .sentimentScore)
let score = Double(sentiment?.rawValue ?? "0") ?? 0.0
// score: -1.0 (negative) ... +1.0 (positive)

Android — ML Kit Text APIs:

EntityExtraction (ML Kit) finds addresses, phones, dates, tracking numbers, money — offline, model downloads once (~8 MB). LanguageIdentification — analog of NLLanguageRecognizer. SmartReply model — covered in separate service.

Text Classification on TFLite

Platform APIs can't do domain classification — won't say "food review" or "tech support request". Need own model.

Typical pipeline for mobile NLP classifier:

  1. Training: BERT-tiny or MobileBERT (8 MB vs 100 MB full BERT) on PyTorch/TF
  2. Conversion: torch.onnx.export() → ONNX → onnxruntime-mobile, or tf2tflite.tflite
  3. Quantization: int8 via TFLite Converter gives ~4x compression with minimal accuracy loss
class TextClassifier(context: Context) {
    private val interpreter: Interpreter
    private val tokenizer: BertTokenizer

    init {
        val modelBuffer = loadModelFile(context, "bert_tiny_classifier.tflite")
        interpreter = Interpreter(modelBuffer, Interpreter.Options().apply {
            addDelegate(NnApiDelegate()) // Android Neural Networks API
        })
        tokenizer = BertTokenizer.fromAssets(context, "vocab.txt")
    }

    fun classify(text: String): ClassificationResult {
        val tokens = tokenizer.encode(text, maxLength = 128, truncate = true)
        val inputIds = Array(1) { tokens.inputIds.toIntArray() }
        val attentionMask = Array(1) { tokens.attentionMask.toIntArray() }
        val output = Array(1) { FloatArray(NUM_LABELS) }

        interpreter.runForMultipleInputsOutputs(
            arrayOf(inputIds, attentionMask),
            mapOf(0 to output)
        )
        return output[0].argmax().let { ClassificationResult(label = LABELS[it], confidence = output[0][it]) }
    }
}

NNAPI delegate on Android 8.1+ speeds inference via DSP/NPU. On Pixel 7+ — up to 10x acceleration. On budget devices NNAPI can be slower than CPU — test on real devices.

Named Entity Recognition

NER — extract named entities from text (persons, organizations, locations, dates). Applications: auto-create calendar events from messages, pre-fill forms from CV, parse receipts.

ML Kit EntityExtraction covers standard entities without training. For custom domains — own NER model based on BiLSTM+CRF or BERT. Model size: BiLSTM — 5–15 MB, DistilBERT-NER — ~60 MB in fp16.

On iOS NL framework returns NLTag with types: .personalName, .placeName, .organizationName. Works offline.

Summarization and Translation

On-device summarization requires heavy models (BART, T5 minimum 60–100 MB). For mobile — either extractive summarization (select key sentences without generation, via TF-IDF + MMR, ~100 KB logic) or cloud API (OpenAI, YandexGPT).

Machine translation: ML Kit Translation supports 59 languages, models download on demand (~30 MB per language pair). On iOS — MLTranslation via Apple Intelligence (iOS 18+) or cloud APIs.

User Input Processing: Cleaning and Normalization

Often overlooked step — text pre-processing before NLP model. Typos, slang, emojis, mixed keyboard layout — all reduce accuracy. Apache Lucene Analyzers on Android or NLTokenizer with custom rules on iOS help normalize text.

Implementation Process

Define NLP tasks and quality requirements. Choose approach: platform APIs, ML Kit or custom model. For custom: prepare data, train, quantize, convert. Integrate with NNAPI/Metal delegate for acceleration. Test on language diversity (dialects, input errors).

Timeline Guidelines

Integrate platform NLP APIs (sentiment, tokenization, NER) — 3–5 days. Custom classifier with training and mobile optimization — 3–6 weeks.