I need to implement a program to handle a word correction / suggestion system.
- if input is given as 'freind', it should suggest 'friend'.
For this I have a GUI containing a text area alone!
Suggest to me a way to accomplish this. If not in Java, you can also suggest me in Python, using javascript also because I can use those as well.
Thanx in advance. :)
there are lots of opensource spell checker available
http://spellerpages.sourceforge.net/
http://jazzy.sourceforge.net/
Related
I need use ascii character as a bullet point with html content in swing application. I found this article and it works with browser exactly i want but not with java. I suppose that css tags won't supported in java according to this. May be i'm wrong.
I like to know is there a workaround for this. Another constrain that i have is not to use images as bullet points.
Thanks in advance.
would HTML entities work?
• • •
you can do like this:
styleSheet.addRule("ul{list-style-type:circle;margin:0px 20px;}");
I have to do a library Magement System in Java Swing. I had done it well with all your supports. Thank you all. Now this s/w needs to identify book and students by barcode (1d). I couldn't get a perfect logic from any where. I have read in SO and other web. I got some logic. But the vision is not clear.
I know this.
bar-code scanner output to port - listen to key strock- need Interface
My doubt is
What the order of the logic flow. ?
do i have to add any lib/jar files to do it.
how to implement this?
I have read a focused text field is needed. How to know did the scanner end key stocks.
I am totally confused. Sorry for reading poor English. I will make up this
Advanced thanks for all your support .
Read the picture from the reader (depends on the hardware, you might need to use the proprietary API or whatever it requires)
Use a barcode reading library to 'parse' the picture. (like zxing, which maybe can access a camera?)
which will give you the number hidden in the barcode.
Is there any open source Java implementation for LDPC (Low Density Parity Check) codes, I found only MATLAB codes.
My scenario is I will take text file and divide into block and I will delete some data in text file, and by using LDPC codes I need to recover data from text files.
Thanks.
I haven't tried this but the code here should get you started
http://www.cs.utoronto.ca/~radford/ftp/LDPC-2006-02-08/install.html
http://www.cs.utoronto.ca/~radford/ftp/LDPC-2006-02-08/examples.html
It's in C though. Might be easy to port. Or not.
I'd suggest looking into ways of calling matlab functions in java. I know there are a couple. Also why LDPC? While its one of the best FEC, it involves lots of matrix manipulation if I recall correctly. This is stuff much better suited for mat[rix]lab. The right tool for the right job...
There are also these two pure Java implementations:
https://github.com/a4a881d4/ldpc-java
https://github.com/pierroweb/LDPC-correcting-codes
I haven't tested them and would appreciate feedback from anyone else that has.
There's also a Java wrapper around a C++ library: http://cpham.perso.univ-pau.fr/MULTICAST/Java_wrapper_for_LDPC.html
Not the most promising results, but something to start from, at the very least.
I have a requirement to print data exactly in a particular position in paper. How can these kind of formatting be done using Java?
Jasper, iText will work for you.
Which kind of data ?
If it's form, the use of reporting library can help you:
http://jasperforge.org/projects/jasperreports
If it's graphic you can try using 'raw' java api:
http://download.oracle.com/javase/tutorial/2d/printing/printable.html
Or use the Java print API:
http://www.ibm.com/developerworks/java/library/j-mer0322/index.html
http://www.ibm.com/developerworks/java/library/j-mer0424.html
If you really need full control, you can print Graphics2D objects directly. See http://java.sun.com/developer/onlineTraining/Programming/JDCBook/render.html and the next page.
Another possibility would be printing PDF, e.g. using iText. I think exact positioning is possible, but probably harder than using Graphics2D.
I'd like to generate an image file showing some mathematical expression, taking a String like "(x+a)^n=∑_(k=0)^n" as input and getting a more (human) readable image file as output. AFAIK stuff like that is used in Wikipedia for example. Are there maybe any java libraries that do that?
Or maybe I use the wrong approach. What would you do if the requirement was to enable pasting of formulas from MS Word into an HTML-document? I'd ask the user to just make a screenshot himself, but that would be the lazy way^^
Edit: Thanks for the answers so far, but I really do not control the input. What I get is some messy Word-style formula, not clean latex-formatted one.
Edit2: http://www.panschk.de/text.tex
Looks a bit like LaTeX doesn't it? That's what I get when I do
clipboard.getContents(RTFTransfer.getInstance()) after having pasted a formula from Word07.
First and foremost you should familiarize yourself with TeX (and LaTeX) - a famous typesetting system created by Donald Knuth. Typesetting mathematical formulae is an advanced topic with many opinions and much attention to detail - therefore use something that builds upon TeX. That way you are sure to get it right ;-)
Edit: Take a look at texvc
It can output to PNG, HTML, MathML. Check out the README
Edit #2 Convert that messy Word-stuff to TeX or MathML?
My colleague found a surprisingly simple solution for this very specific problem: When you copy formulas from Word2007, they are also stored as "HTML" in the Clipboard. As representing formulas in HTML isn't easy neither, Word just creates a temporary image file on the fly and embeds it into the HTML-code. You can then simply take the temporary formula-image and copy it somewhere else. Problem solved;)
What you're looking for is Latex.
MikTex is a nice little application for churning out images using LaTeX.
I'd like to look into creating them on-the-fly though...
Steer clear of LaTeX. Seriously.
Check out JEuclid. It can convert MathML expressions into images.