Home Answers Viewqa Java-Beginners Extarct equation

 
 


babu
Extarct equation
1 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners

Want to extarct equation of the form ax+by+c=0 from any word document.

View Answers

January 27, 2011 at 5:05 PM


Hi Friend,

Try this:

import java.io.*;
import java.util.*;
import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.extractor.WordExtractor;

public class FileRead{
public static void main(String[] args) {
File file = null;
WordExtractor extractor = null ;
try {
file = new File("c:\\Hello.doc");
String st="";
FileInputStream fis=new FileInputStream(file.getAbsolutePath());
HWPFDocument document=new HWPFDocument(fis);
extractor = new WordExtractor(document);
String [] fileData = extractor.getParagraphText();
for(int i=0;i<fileData.length;i++){
if(fileData[i] != null)
st+=fileData[i]+" ";
}
StringTokenizer stk=new StringTokenizer(st," ");
while(stk.hasMoreTokens()){
String str=stk.nextToken();
if(str.indexOf('=')>0){
System.out.println(str);
}
}
}
catch(Exception ex){}
}
}

For the above code, you need Apache POI Library.

Thanks









Related Pages:
Extarct equation
Extarct equation  Want to extarct equation of the form ax+by+c=0 from any word document.   Hi Friend, Try this: import java.io.*; import java.util.*; import org.apache.poi.hwpf.HWPFDocument; import
Extarct string from PDF
Extarct string from PDF  how can i search a particular character from pdf? also extarct string from a pdf document
extract equation
extract equation  I want to extract equation from doc.   Hi Friend, Which equation you want to extract from the word document? Clarify this! Thanks
quadratic equation
quadratic equation  program to find roots of a quadratic equation?   Hi Friend, Try the following code: import java.util.*; class...); System.out.println("Quadratic Equation is ax2+bx+c"); System.out.println("Enter value
Quadratic Equation - Java Beginners
the corresponding equation, if it has a solution, or print an appropriate message... to solve an equation (y/n)? y Enter a: 1 Enter b: -5 Enter c: 6 Root1: 2.0 Root2: 3.0 Do you want to solve an equation (y/n)? y Enter a: 1 Enter b: -1
Extracting equation from any document
Extracting equation from any document  how can i extract equation from any word document?   Hello Friend, If you want to extract data from the word file, then visit the following link: Extract data from word document
Java find the roots of quadratic equation
Java find the roots of quadratic equation In this tutorial, you will learn how to find the roots of quadratic equation. Quadratic Equations are always in the form ax2 + bx + c = 0. Every Quadratic equation has two roots
how to find the roots of polynomial equation of 'n'th degree in java
how to find the roots of polynomial equation of 'n'th degree in java  i am new to java field and i wanted to find the roots of nth degree polynomial equation pls help me. thanks
write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n
write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n  write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n
java
java  how to write a java program to solve quadratic equation
java
java  how to write a java program to solve a quadratic equation
Biquadratic regression analysis - Java Beginners
Biquadratic regression analysis  Hi Is there any code available to solve bi quadratic equation using regression analysis? Thanks in advance
i cNT GET ANSWER FOR THIS QUESTION
equation ax2+bx+c=0, aïâ??¹0 are given by the following formula: x=(-bÃ... the discriminant . If b2-4ac=0, Then the equation has a single(repeated) root. If b2-4ac<0, the equation has two complex roots. Write a program that prompts the user
java programming - Java Beginners
java programming  asking for the java code for solving mathematical equation with two unknown .thnx ahead..  Hi Friend, Please clarify your question. Which mathematical equations you want to solve? Thanks
java program - JavaMail
java program  if int a = 48 find a = a+++++a answer shows 48+49+1 97+1 98 pls clarify find a equation, as I think there some operator mistake tapas
please help.. this my importtant project..!!!!!
: Solving quadratic equations. The two roots of a quadratic equation ax2 + bx... is called the discriminant of the quadratic equation. If it is positive, the equation has two real roots. If it is zero, the equation has one root
Problem reading word file
Problem reading word file  Deepak you provide me code for extarcting equation from a word file and also to write in a word file.But when I again want to read preveously created word file(created by your code) it gives an error
Round of to a multiple of 5 without using function
Round of to a multiple of 5 without using function  Please help me out... U enter values like 239, 2543.876, 962.... Give me an equation without using any function which will give output of 240, 2545, 960 respectively
Round of to a multiple of 5 without using function
Round of to a multiple of 5 without using function  Please help me out... U enter values like 239, 2543.876, 962.... Give me an equation without using any function which will give output of 240, 2545, 960 respectively
setting RGB for a circle
not able to find its appropriate equation help please
Java Programming: Solution to Programming Exercise
of // the quadratic equation A*x*x + B*x + C = 0. // (Throws... the subroutine to compute a solution of the equation. If no error occurs, it should... that error and print an error message. After processing one equation, the program
java programming problem - Java Beginners
those solution sets.   go through the linear Equation book we must
about array in java
about array in java  speed of a vehicle is measured using the total time and the distance by using the equation given bellow speed(km/hour)=distance(km)/time(hour) Each vehicle is given a unique identification number
java
java  1.Design then implement a Java program that defines and initializes the coefficients of a linear equation 2x + 4.5 = 0. Also, make your program compute and display the solution of the equation 2.Design then implement
Java Program
Java Program  Problem Statement You are required to write a program which, when given a sequence of integers, creates an equation. All but the last... an expression. Like in any good equation, the LHS must equal the RHS. The operators
gauss elimination of system of linear equations using java code
of equation "+ (i+1)); for(int j=0;j<n;j++){ k=s.nextDouble...++){ System.out.println("enter the RHS of equation "+ (i+1)); k=s.nextDouble
Plotting equations on a cartesian Plane
of an equation (eg. y=3x) and plots possible values for it on a cartesian plane thats... equation into the Text field.. Your help will be greatly appreciated
Toggle hide/show by clicking same button
;flip++ % 2 = = 0" equation if it is true ,then it will hide paragraph
determinant of n*n matrix using java code
++) { System.out.println("enter the elements of matrix of equation" + (i+1
Zoho Writer
processor is equipped with LaTeX based Equation Editor under 'Insert'
Cramers rule for solving equations using java
of of equation" + (i+1)); for(int j=0;j<N;j++) { double k=s.nextDouble(); A[i][j]=k
Java Programming: Chapter 9 Exercises
of // the quadratic equation A*x*x + B*x + C = 0... call the subroutine to compute a solution of the equation. If no error occurs... catch that error and print an error message. After processing one equation
What is Differential GPS?
on the equation. This means that instead of using timing signals to work out its
Find out the prime number
; condition and if the reminder of the earlier equation comes "0"
Java Programming: Section 9.2
is a solution of the equation A*x2 + B*x + C = 0, provided that the value..., then the fact that x is a solution of the equation becomes a postcondition... of the equation A*x2 + B*x + C = 0 is also valid. This program segment correctly
Multiplication of two polynomials using linked list in java
to skip to next equation: "); coef = scan.nextInt(); return coef; } //read
VoIP Mobile
phone providers-as well as to end users. Here's how he sees the equation
What is Velocity?
an expression (enclosed in brackets) - an equation that assigns a value to a variable
Web Services
standardized set of  web services can be summarized by using an equation. Web Services
Web Services - Web Services Tutorials
standardized set of  web services can be summarized by using an equation. Web Services
Java Programming: Section 9.3
the larger of the two roots of // the quadratic equation A*x*x + B*x
Java Programming: Section 2.2
is completely different from the meaning of an equation in mathematics, even
Error during runtime NoClassDefFound in java
the validity of the equation A = V*D*inverse(V) depends upon V.cond
Error during runtime NoClassDefFound in java
the validity of the equation A = V*D*inverse(V) depends upon V.cond

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.