Using Python, tokenize using space as a parameter. Count the total number of words in the document and the frequency of each word. Also, identify the word with least frequency appearance and most frequency appearance

Member Avatar
Member Avatar
+0 forum 2

for(int i = 0; i < program.size(); i++) if(program.get(i).contains(remp)) with the coding above, i can search and display all string in my arraylist that contains "hit2080". for example HIT2080___Introduction to Programming___ALL___Core___NULL___NULL HIT1307___Internet Technologies___ALL___Core___NULL___HIT2080 but i just want to search and display the first token that contains string "hit2080". Is there any way to get the first token?

Member Avatar
Member Avatar
+0 forum 8

How to parse a string data " B. Prakash 98400 51038 B.M. LAL BROS., TYRjijbEALERS 3 Whites Road, Royapettoh,thennai r 600 014. Ph: 2852 4560 Fax: +91-44-2858 8306 Email: bmlalbros@etn.iiet'" conisder this is my string data and i need to fetch name, address, phone , email seperately is there any logic there... how to parse ... by theory wise i know use string tokenizer or string[] string.split(" .... ") but this req one character based on that it split... wat i am suggest is @ means sure ly it is email .. i need to fetch whole word (XXX@YYYY) +91 …

Member Avatar
Member Avatar
+0 forum 3

This is the block of data I have to work with: 5 5 5 6 5 8 9 5 6 8 good, very good, excellent, good 7 7 8 7 6 7 8 8 9 7 very good, Good, excellent, very good 8 7 6 7 8 7 5 6 8 7 GOOD, VERY GOOD, GOOD, AVERAGE 9 9 9 8 9 7 9 8 9 9 Excellent, very good, very good, excellent 7 8 8 7 8 7 8 9 6 8 very good, good, excellent, excellent 6 5 6 4 5 6 5 6 6 6 good, average, …

Member Avatar
Member Avatar
+0 forum 1

Hi everyone, I am using this method to read in a collection of ints and strings then converting the strings to numbers using the switch statement(as stated by my lecturer) and save it back into an array for further processing. However, everytime it gets to the line studentResponses[row][column] = scanner2.nextInt(); I get the error: **java.util.InputMismatch exception: null (in java.util.Scanner)**. I have spent so long trying to figure out what could be causing this error to no avail so any guidance at all would be appreciated :) public void readMarksData(String fileName, int numberOfStudents, int responsesPerStudent) throws FileNotFoundException { studentResponses = new …

Member Avatar
Member Avatar
+0 forum 2

Okay, so I have a text file like this: I Did It Your Way, 11.95 The History of Scotland, 14.50 Learn Calculus in One Day, 29.95 Feel the Stress, 18.50 Great Poems, 12.95 Europe on a Shoestring, 10.95 The Life of Mozart, 14.50 And, as you can see, there are prices of the items at the end. Somehow I want to extract thsee numbers and read them into an array so I can perform calculations with them... What could I possibly do? Thanks!

Member Avatar
Member Avatar
+0 forum 6

Hi...I want to read from a file and put each line in...the given file is like that : q0,q1,q2; a,b; q0; 7; q0,a,q0; q0,b,q1; . . . . (as you see it's the information of a nfa) Each line ends with ";" and each element of array is separated with ","...for example for line 1 we should define an array for example "States[i]" and the array is like that : State[1]=q0 State[2]=q1 State[3]=q2 can anyone help me with it ? I don't know how to do that...I searched Tokenizer method, but still have problem with details of my file as …

Member Avatar
Member Avatar
+0 forum 5

Hello all, As part of a homework assignment, we're to take [URL="http://stroustrup.com/Programming/calculator08buggy.cpp"]a given buggy calculator[/URL] and correct the errors. Once that's done, the assignment is to add the sqrt() and pow() functions to said calculator. This is from Stroustrup's Programming, Principles and Practices using C++. I've been working on the addition of the sqrt() function, but I can't seem to get it working. The current error is error C2665: 'sqrt' : none of the 3 overloads could convert all the argument types, and I haven't been able to figure out how to fix it. Any tips on how to proceed? …

Member Avatar
Member Avatar
+0 forum 3

if i have information like this a->b->c->d->MESSAGE,how do i tokenize it such that i get a,b->c->d->MESSAGE from the original string???????????

Member Avatar
Member Avatar
+0 forum 5

Hi my problem is that i'm making a mobile app and i need to seperate the following string: ChrisHunter21 into: Chris Hunter 21 What is the easiest way to do this in J2ME ? i had a look at the Ostermiller one but didnt understand it. Thanks Chris

Member Avatar
Member Avatar
+0 forum 5

Hey guys. So I want to learn how to do a simple I/O to and from a file. I want the simplest way to do this. My teacher sent me her program but I don't think I get what she is doing and it's giving me an error. So I would also like to clarify a term - Tokenizer. Also, how do I read multiple lines? or find out how many lines are there in a file which are not blank? And if the input is separated by white space, how do I get each one into a separate variable? …

Member Avatar
Member Avatar
+0 forum 8

The End.