labassignment2 updated mohit tokenizereecs.csuohio.edu/...updated_output_mohit_tokenizer.pdfname:...

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

Upload: others

Post on 27-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LabAssignment2 Updated Mohit Tokenizereecs.csuohio.edu/...Updated_Output_Mohit_Tokenizer.pdfName: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type of

Name: Mohit M. Moradiya

CsuId: 2641323

13 | P a g e

Output Screenshot

Page 2: LabAssignment2 Updated Mohit Tokenizereecs.csuohio.edu/...Updated_Output_Mohit_Tokenizer.pdfName: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type of

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 Tokenizereecs.csuohio.edu/...Updated_Output_Mohit_Tokenizer.pdfName: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type of

Name: Mohit M. Moradiya

CsuId: 2641323

15 | P a g e

Output with Using Jsoup

Page 4: LabAssignment2 Updated Mohit Tokenizereecs.csuohio.edu/...Updated_Output_Mohit_Tokenizer.pdfName: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type of

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 Tokenizereecs.csuohio.edu/...Updated_Output_Mohit_Tokenizer.pdfName: Mohit M. Moradiya CsuId: 2641323 16 | P a g e DataCout.java Class without type of

Name: Mohit M. Moradiya

CsuId: 2641323

17 | P a g e

Output without any type of parsing or ignoring html contents