简体   繁体   中英

How to get all English words in an array for autocomplete?

I am working on an Android app where we add post with some tags like in Stack Overflow. I observed that people in my app add tags with different patterns like they use technology as tech, techno, technologies or startup, start up or start-up so when they do something like this then sorting post on searching is a challenge. I mean when they search for startup they cannot see post tagged with start up or start-up.

So I thought to change the edittext where users write tags to an autoCompleteTextView so now they must have to add tags from the list provided in the app. But for the list of words I need a list/array of strings but I can't include them in my app as there are millions of words and they will increase the size of the app up to 5 to 6mb. So I want a free API for my app.

There are many APIs are for this one of them is here .

A text file containing 479k English words for all your dictionary/word-based projects eg: auto-completion / autosuggestion

You can get tutorials on this. If you want to use it in android with kotlin by just searching it like "Kotlin with Retrofit 2".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM