Annotation export to CSV file


bluesunny
 

Hi again,
I have another question :)
As I mentioned earliear, I tried doing annotation using my ontology and want to export the annotation lists.
As you can see below, the highlighted area are different 'class' of my ontology and I want to export the highlighted class(=words) in a csv file and want to do data analysis in other tool(because I don't know JAVA language. not a profesional in this area)
  






In the previous questions and replys, I noticed that I can use 'Save as CSV' option like below.




However, I don't know what I should insert in the 'Value' column and cannot found any information related to this problem in user guide.
I tried OK button without any manipulation, but it produced CSV file with any contents in it. 
Can you help me?




Sincerely yours,
Y
 


Mark Greenwood
 

Yes, the CSV output isn't well documented, sorry.

I think all you'll need to do is set the columns parameter. For this if you put the name of an annotation then you'll get the string under the annotation into the CSV file. If you put annotation.feature (i.e. Token.string) then it's the feature value that comes out. Unfortunately that only outputs the first annotation of each type within the document. If you set annotationType to Sentence (and have run a sentence splitter) then you'll get one row per sentence, and details of the first annotation per type within the sentence. Which still isn't ideal.

You can also use the configurable exporter (https://gate.ac.uk/userguide/sec:misc-creole:confexport) but this has similar limitations.

You could possibly set the annotationType on the CSV exporter to be the name of one of you annotation types (i.e. ontology classes) and that way you would get a row per annotation, but you would then need to export each type separately. Another option would be to convert the annotations (possibly using JAPE) so that they are all of the same type and the ontology class is a feature. That way you could use the new single type as the value of annotationType and then export the string as one column and the class feature as another,

Mark

On 22/09/2022 08:48, yr Noh wrote:

Hi again,
I have another question :)
As I mentioned earliear, I tried doing annotation using my ontology and want to export the annotation lists
As you can see below, the highlighted area are different 'class' of my ontology and I want to export the highlighted class(=words) in a csv file and want to do data analysis in other tool(because I don't know JAVA language. not a profesional in this area)
  






In the previous questions and replys, I noticed that I can use 'Save as CSV' option like below.




However, I don't know what I should insert in the 'Value' column and cannot found any information related to this problem in user guide.
I tried OK button without any manipulation, but it produced CSV file with any contents in it. 
Can you help me?




Sincerely yours,
Y