From: Haejoong L. <hae...@un...> - 2003-03-20 16:21:43
|
Guido, Your plan looks just right. I can guess that you looked at 2.0 source or documentations because you mentioned "plugin." As you pointed out, the key point in adding a file I/O plugin is the parser (or loader).=20 Unfortunately there is no direct support for that format. Lex/Yacc seem to be a good choice. I tried flex/bison with aglib before, and I think there was no problem mixing them. What the parse does is to create AG objects (AGSet, Timeline, Signal, AG, Annotation and Anchor) as it parses through the given annotation file. Once you finish the parser, to complete the plugin, you need to wrap your parser with load() method of agfio_plugin class. There is a toy example for this in the aglib cvs: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/agtk/AGLIB/src/formats/MyF= ormat/?only_with_tag=3DToward-2_0 The RE class in aglib might come in handy when you write your parser. If you need further information on plugin stuff, just let me know. Thanks, Haejoong On Thu, Mar 20, 2003 at 11:37:49AM +0100, Guido Di Maio wrote: > Hi, > is nobody there ? >=20 > I'm evaluating if I can use AGLIB to annotate and align my transcriptio= ns. > In order to do that, I would like to figure out how I can write the=20 > parser for my transcription. >=20 > this is the process I have to implement: >=20 > 1) The source file is a (dialogs) transcription which is quite similar=20 > to CHAT/CHILDES format (see an example on the bottom of this message). > In the transcription there is no sort of time stamps. Hence, I have to=20 > parse the text and to create the annotation graph WITHOUT temporal=20 > references. >=20 > 2) The second step should consist in aligning the AG to the sound track= .=20 > This step should be done in a semi automatic way; > In order to do this I should have to develop a suitable tool. The=20 > alignment process is a separate from step 1) because the the kind of=20 > transcription is > too time consuming. >=20 > 3) The further step could be the editing of the AG in order to edit=20 > existing annotation levels and to add new annotation ones. >=20 > What do you think about the work-flow I have just presented ? >=20 > Yesterday I had a look to the AGLIB code and I appreciate the=20 > extensibility of the file wrapper. > So the problem in carrying out step 1) is to extend the agfio class. > The problem is the file parser. As you can see below, the transcription= =20 > file does NOT have a predefined number of field (record) per line (or=20 > per turn). > Thus the Record class does not seem to fit my need. >=20 > Do you have any suggestion ? > The best way to write such a parser is to write my own parser or to use= =20 > lex and yacc ? >=20 > Thanks in advance. > Guido Di Maio >=20 >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *MIC: pi=F9 bello ... no / no pi=F9 bello // =E8 pi=F9 brutto rispetto = + > *ANT: agli altri // > *MIC: agli altri film di [/] di Villaggio // pi=F9 brutto xxx // cio=E8= / si=20 > vede che lui cerca le battute / per far ridere // non gli vengono=20 > spontanee // quindi ... no / comunque / si ride lo stesso // tutto ... > *ANT: io / ho visto una scena in televisione // una + era / sai / di=20 > quelle fatte per / presentare i film // per=F2 era simpatico // <c' era= > + > *MIC: [<] <mah> / # non lo so / =E8 + cio=E8 / mi sono divertito // per= =F2 /=20 > non come altre volte // tipo / Fantozzi / poi / Fantozzi contro tutti /= =20 > poi / Il secondo tragico Fantozzi / e tanti altri // insomma / tutto=20 > sommato / <piace> // > *ANT: [<] <io mi> [/] io mi ricordo di averne visto uno / che mi piacev= a=20 > // a me Villaggio sta antipatico // per=F2 / insomma ... quando ho vist= o +=20 > non mi ricordo com' era il titolo // per=F2 / era simpatico // quando c= '=20 > era / &he / il panettiere / che era l' amante della moglie ... > *MIC: ah // forse <xxx> + > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Tablet PC. =20 > Does your code think in ink? You could win a Tablet PC.=20 > Get a free Tablet PC hat just for playing. What are you waiting for?=20 > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en > _______________________________________________ > agtk-devel mailing list > agt...@li... > https://lists.sourceforge.net/lists/listinfo/agtk-devel |