Filters on Weka - java

I need to generate a filter in Java using the Weka API that will read in files and trigger an alert if a file contains a word from a predefined list. I am just beginning Weka so am not entirely sure how this would work in weka, please help :) I can't find any tutorials which are for beginners

Everything you need to begin with Weka API can be found in this site.
When I need to build some kind of filter, I subclass BufferedReader (java.io.BufferedReader) and override some of its methods. Weka also has some interfaces and classes that can do most of the job (like selecting only some desired attributes or normalizing data). Look inside that link to gain more knowledge about it.

As you are a beginner, the first thing you should learn is to properly use weka in your Java code. The following website will be helpful: Wekawiki

Related

How to add context sensitive help text for custom functions in eclipse

I am programming for using eclipse as an IDE to program in a different language. I have implemented custom content-assist feature using eclipse using the org.eclipse.jface.text.contentassist.IContentAssistProcessor package. You can see my output below with the "__XXXXX" functions being displayed as someone types anything based on the context.
How can I display function details of a custom function. I mean, the type of help that can been seen in normal functions. I want to give an useful information about these functions.
See ICompletionProposal.getAdditionalProposalInfo() and ICompletionProposalExtension5.getAdditionalProposalInfo(...). Eclipse contains several examples on how to implement these.

An example of using LibSVM in java

I am considering using libsvm. Currently, I have transformed my feature vectors to SVM feature vectors format. I am using LibSVM inside a project I will need to somehow use it within my app. The problem is that at the moment all examples available use the command line to provide input to the LibSVM. I don want this.
Can you please give me an example of how I can use it within my code (no calls to the command prompt and no Weka).
Thanks
There are examples in the distribution source code https://github.com/arnaudsj/libsvm/tree/master/java
The applet doesn't use command-line input. Check libsvm-3.11.tar.gz\libsvm-3.11.tar\libsvm-3.11\java

Generating CCD document using MDHT API

I am trying to use MDHT API to generate CCD documents. I am doing this in the following way.
Downloaded Java runtime libraries and placed them in classpath and writing code to generate all the sections using MDHT API.
Writing code for each section is taking long (a bit complicated). I was wondering if I am missing anything. Is there any open source mdht GUI that generates code for each section or am I moving in the right direction?
I am currently stuck at Medications Section/Immunization Section. Can anyone please redirect me to any examples/tutorials related to each section. I have already looked at user guide/developers guide.
Any help is appreciated.
I think MDHT API will only provide a Model for the CCD document.
if it contains any default implimentaion to generate CCD document,,i dont know..
any way better you just generate the XML in DOM,STAXs API.
CCD example link
Another better API that i found is MIRTH
follow the link
Mirth User guide
The best place to look for help/sample code is the developers forum: Eclipse Community Forums ยป Model Driven Health Tools.
You may need to create a (free) account to get access.
You could also go to the forums to post your specific MedicationsSection/immunization question for a possible specific answer.
Another good site is CDA tools: MDHT Developers Guide. Look at Produce CDA Content using MDHT API.
There are countless examples of building documents in the test code projects.
Download the All In One (MDHT_CDATools) from GitHub linked in the MDHT project site and look at the code in the test projects such as: org.openhealthtools.mdht.cda.consol.example
The closest (current) thing to a GUI based document building application in MDHT would be using the all in one to modify the existing models and generate sample snippets/documents that way (or creating a model from scratch, which includes only what you need). If you wanted the entire document produced in XML, you could then generate the instance from GeneralHeaderConstraints as opposed to any of the many child templates (which would give you snippets). Either way, this is not really the intention of the model interface (it's more for conformance) and would take you far longer to implement than using the API itself - which accesses the models which already exist in order to auto-generate conformant content quickly.

Examples of implementing Java Document model

Does anyone have any real life use cases where someone had to make a non-trivial implementation of the Java Document interface?
I'm looking for descriptions of the real use case, not examples of code, and not tutorials.
I did a little work for an open source MMO game known as HackWars. As part of the game I implemented an in-game chat system that ran as in InternalJFrame inside the main client. I used Document in conjunction with a JTextPane so that I could insert strings and use different fonts for different users within the same JTextPane.
The project source is hosted here: https://www.assembla.com/code/hackwars/git/nodes
The chat code starts here: https://www.assembla.com/code/hackwars/git/nodes/HWTomcatServer/webapps/ROOT/WEB-INF/classes/HWChat
The specific file I used Document in was HWChat.client.chatPane which you can see the source code for here: https://www.assembla.com/code/hackwars/git/nodes/HWTomcatServer/webapps/ROOT/WEB-INF/classes/HWChat/client/chatPane.java
As part of a Java IDE I implemented an editor kit for Java source text. The document handled things like balancing brackets and quotes and auto-indenting, and also kicked off the incremental compilation process.

OpenOffice use .odm programmatically in Java

I need to do some work on a Master Document (.odm) with the UNO IDL and it's binding to Java.
I want to know if there is a way to access all the documents it's referencing and, if possible, without extracting the content.xml.
What I managed to do so far is to open the document as a XComponent, to open it's XTextDocument interface (and to extract the text belonging to the document but not the one from the included documents). And I'm unable to gather some useful information from that.
Is there an interface that could help? Or some other stuff?
You might want to look into the ODF Toolkit, since the easier parts are Java-based.
The ODF Toolkit project is currently moving to an Apache incubator project.
The current site is here: http://odftoolkit.org/
The new project is at http://incubator.apache.org/odftoolkit/
On the other hand, extracting the content.xml of the .odm might be a better way to go. There is probably some XSLT magic you can use to locate the references to the separate parts.
Also, when you open the master document in an OpenOffice.org consumer, doesn't it show clues about how the constituent documents are found? The one time I messed with this, I noticed that the components had software-generated names that were pretty obvious.

Categories

Resources