5
Name: Mohit M. Moradiya CsuId: 2641323 13 | Page Output Screenshot

LabAssignment2 Updated Mohit Tokenizercis.csuohio.edu/~sschung/...Output_Mohit_Tokenizer.pdf · Name: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LabAssignment2 Updated Mohit Tokenizercis.csuohio.edu/~sschung/...Output_Mohit_Tokenizer.pdf · Name: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type

Name: Mohit M. Moradiya

CsuId: 2641323

13 | P a g e

Output Screenshot

Page 2: LabAssignment2 Updated Mohit Tokenizercis.csuohio.edu/~sschung/...Output_Mohit_Tokenizer.pdf · Name: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type

Name: Mohit M. Moradiya

CsuId: 2641323

14 | P a g e

DataCount.java if we use Jsoup parser

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package dataanalysiscount;

import java.util.StringTokenizer;

import org.jsoup.Jsoup;

/**

*

* @author Mohit

*/

public class DataCount {

int countResearch(String line, String subString){

int countPerLine = 0;

line = Jsoup.parse(line).text();

int index = 0;

while ((index = line.indexOf(subString, index)) != -1)

{

index++;

countPerLine++;

}

return countPerLine;

}

}

Page 3: LabAssignment2 Updated Mohit Tokenizercis.csuohio.edu/~sschung/...Output_Mohit_Tokenizer.pdf · Name: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type

Name: Mohit M. Moradiya

CsuId: 2641323

15 | P a g e

Output with Using Jsoup

Page 4: LabAssignment2 Updated Mohit Tokenizercis.csuohio.edu/~sschung/...Output_Mohit_Tokenizer.pdf · Name: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type

Name: Mohit M. Moradiya

CsuId: 2641323

16 | P a g e

DataCout.java Class without type of parsing or ignoring html contents

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package dataanalysiscount;

import java.util.StringTokenizer;

import org.jsoup.Jsoup;

/**

*

* @author Mohit

*/

public class DataCount {

int countResearch(String line, String subString){

int countPerLine = 0;

int index = 0;

while ((index = line.indexOf(subString, index)) != -1)

{

index++;

countPerLine++;

}

return countPerLine;

}

}

Page 5: LabAssignment2 Updated Mohit Tokenizercis.csuohio.edu/~sschung/...Output_Mohit_Tokenizer.pdf · Name: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type

Name: Mohit M. Moradiya

CsuId: 2641323

17 | P a g e

Output without any type of parsing or ignoring html contents