[Tutor] Replacing fields in lines of various lengths
Alan Gauld
alan.gauld at btinternet.com
Tue May 5 11:46:01 CEST 2009
My turn to apologise for premature sending of email...
For some reason I didn't notice the section of mail after
the code snippet!
Alan G
"Dan Liang" <danliang20 at gmail.com> wrote in message
Now since I have to work on different data format as follows:
-------------Begin data----------------------------
w1 \t case_def_acc \t yes
w2 \t noun_prop \t no
w3 \t case_def_gen \t
w4 \t dem_pron_f \t no
-------------End data----------------------------
Notices that some lines have nothing in yes-no filed, and hence end in a
tab.
My question is how to replace data in the filed of composite tags by
sub-tags like those in the dictionary values above and still be able to
print the whole line only with this change (i.e, composite tags replace by
sub-tags).
More information about the Tutor
mailing list