I need to manually tag a large number of sentences choosing between a small, 
fixed number of short strings as tags for each sentence. I would like to do 
this with a Pharo GUI that displays sentences one at a time and permit choice 
of tags using radio buttons. The results need to be saved as a CSV file on the 
hard drive for further manipulations with python.


As a first step, I used Excel to create a test CSV file with two sentences that 
was saved on the disk drive in the Pharo working directory.

I have subsequently tried to import the sentences into Pharo 6.1 32 bit stable. 
This was done as follows.
|workingDir reader result|


workingDir := FileSystem disk workingDirectory.

myFileName := 'MoonCSV.csv'.

stream := workingDir/myFileName readStreamDo: [ :stream | stream contents].

 

reader := (NeoCSVReader new) separator: Character cr.        The separator was 
changed from a comma to a cr because the inspector showed a cr, not a comma 
separating the two imported sentences.

result := (reader on: stream).

result upToEnd.

 This failed with the following error:

Instance of ByteString doesn’t understand #atEnd.



I don’t see how to proceed further. Also I am not clear on the best way to 
export the sentence and tags to the disk drive.. 



Any help would be appreciated.


Lou Cleveland

Reply via email to