I'm learning about natural language processing, and are required to make a project.
I'm trying to build an application that checks spelling for Vietnamese. However, I just stopped in putting data into the software. I do not know how to split the input data and how to write the code to checks spelling.
I know, Android have APIs support this. Who can recommend me an API and how to use it? Thanks a lot!
Related
TextClassificationManager is available from API-26. Its public methods available for classify text .
My requirement is i need to detect language from a giver Text offline.
TextClassificationManager also have detectLanguages() method but its hidden.
Can i Use TextClassificationManager to detect language ?
I have searched a bit and i Found This Project Using TextClassificationManager by Reflection. But it throws NoSuchMethodErrror and Returns ..
So if anyone Used TextClassificationManager for this purpose can help me .
It's a bad decision to use hidden functions via reflection. You can never know if the function will be there and available so you have to prepare a fallback mechanism.
For Android SDK 26-27 You can try and use this Android lib project - https://github.com/rmtheis/language-detection but be aware that it's no longer maintained so use it for your own research but it's probably not a good idea to use it for production or apps released in Google Play.
I would like to create my keyboard with corrective and spelling for using in every application or website on my device. Please suggest me about how possible and reference of my project.
You have to create an InputMethodService and it will work on all apps.
There is a lot of explanation. But i will include some basic. let me know if you have any confusion.
Read this tutorial create an InputMethod and then go through the second one
And two great tutorial are this and openSource LatinIME
Spelling Checker Framework
The Android platform offers a spelling checker framework that lets you implement and access spell checking in your application. The framework is one of the Text Service APIs offered by the Android platform.
To use the framework in your app, you create a special type of Android service that generates a spelling checker session object. Based on text you provide, the session object returns spelling suggestions generated by the spelling checker.
you can see this link https://developer.android.com/guide/topics/text/spell-checker-framework.html
I am a Computer Science undergraduate student and I am creating an Android app that using an API to interact with an execution server.
The server takes a xml file and do various stuff with it(get data, process data etc.)and then gives back data as output. Both input and output are exchanged via this API.
The problem is that the API references code from javax.xml.bind, for example, JAXBContext while android doesn't have javax.xml.bind package in its core. (a well known issue)
Feasible solutions on the internet seems to be repackaging the code I need, but I don't know exactly what suppose to be.
Since the API reference classes in javax.xml.bind and javax.net, I guess I have to extract code from these 2 packages and make them part of the API (I have access to API source) and then repackage the API. However, I guess classes inside javax.xml.bind might have dependencies on other classes that not supported by Android, so does javax.net. (Please forgive me if this is stupid thought...)
So anyone know : whether there are classes, which codes in javax.xml.bind and javax.net depends on, not supported by android ?
Bit of tricky question really..
I will be really appreciated if you can provide a work around that enable a Android app to call an API that reference codes inside javax.xml.bind.
Try JiBX (http://jibx.sourceforge.net/), it's a small and fast footprint, Android compatible, XML binding framework.
I ended up with repacking those package which exists in standard Java library but not in Android. Basically, just get source code of all those missing packages and then put them into the API source and rename them into a name that is different from the original one and then change corresponding code in API that reference these methods as well (you have to use a different name, otherwise code reference methods in these package will still looking for methods in the core Library (i.e Android API)
Anyway, hope it helps. If you have the same problem.
If you have any better suggestion. Please share it!
I'm hoping to write a tweak to record all activities running on a rooted Android phone. For example, I want to record the information such as:
2012-07-31 15:03 app1:Activity01:onCreate()
2012-07-31 15:04 app1:Activity01:onStart()
...
2012-07-31 15:05 app1:Activity01:onPause()
2012-07-31 15:05 app2:Activity01:onResume()
Is is possible to do it? If so, please kindly tell me where to find the related information, books or domain knowledge I should study to accomplish this task. I'm new on Android programming but familiar with C++ and Java.
Thanks a lot!
Each Android app is executed in its own process running its own instance of the Dalvik VM. The VM normally does not provide the information you are looking for across process boundaries.
If you feel like really hacking your Android you could investigate into these two approaches:
Modify the Android API classes, basically building your own android.jar, where you can override and extend existing functionality.
Try to use the VM's debugging facility to gain access to its runtime state (see e.g. Dalvik VM debug monitor).
Bottomline: Rooting your phone is child's play compared to those hacks.
However, I would advise against trying to 'hook' into Android the way you described, both for performance and stability reasons.
So the answer was it ain't possible in a normal app, even on a rooted phone.
See comments :-)
I would like to know if SNMP is supported in Android(2.1)?
If it is not available, is it possible to port the snmp source for Android?(some pointers plz..)
If it is available, how can I test the presence of it in my device.
All pointers are welcomed.
Thanks,
Sen
SNMP4J 2.x can be directly used on Android without changing its sources. The logging can be set to a simple console logger by calling
static {
LogFactory.setLogFactory(new ConsoleLogFactory());
ConsoleLogAdapter.setDebugEnabled(true);
}
in your root activity. Of course, you can implement a Android Logging Adapter too and register it as shown above.
I know this is a really old question, but I was doing exactly what you're asking. The short answer is no, by default, SNMP is not supported on android 2.1. Because it isn't available, what I wound up doing was grabbing snmp4j's source code, and sticking it in android and making my own library. There are libraries (snmp4android comes to mind) but I found that it lacked certain classes I needed and did not have the whole snmp4j.agent branch.
There are a few dependencies and a few libraries that android is missing but most of them pertain to the log4j class.
To remedy that, just convert/make the switch to something like slf4j, which is a small logging library that you can include with your application.
I hope that answers some of your initial questions, and I hope this is still relevant even if it is an old question.