Is there any code written for merging or splitting AnnotationFiles? I have a large file that has been annotated and I want to split both the text file and the annotation file in half so that the two smaller text files both have annotation files. The two text files with their associated annotation files could then be opened independently.
Just thought I would ask in the off chance....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A while ago I wrote some code to append two annotation files together. It's in: org.annotation.wordfreak.util.Merger.java As far as I know there isn't anything to split files up. Hope this helps...Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yesterday I ran into a need for spliting out part of an annotation file into its own file. Merger now is renamed Adjuster and it now contains both:
static AnnotationFile split(Annotaiton a)
static AnnotaitonFile merge(Annotation a, Annotation b)
Enjoy...Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I know this thread is very old but I have few queries about Merging the annotaion file, thats why writing here. First of all I can't create an instance of Annotation class by calling its constructor in Adjuster.java file, I was trying to call following constructor:
I don't know why it is not allowing me to call this constructor here?
Second thing I was trying to merge two annotation files(.ann files) by calling merge method but it didn't merge the entire annotation into the single annotation file, I am getting the head information but it doesn't give entire annotation in it. Do I need to give extra information? Please suggest..
Thanks in advance.
Rsahay.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> First of all I can't create an instance of Annotation class by calling its constructor in Adjuster.java
> file, I was trying to call following constructor:
Not sure what you are asking here. That constructor isn't called in Adjuster (I'm looking at the code in HEAD) Adjuster calls Annotation.adjustedAnnotation to build the annotation. It's probably the case that Annotation needs data that is private to it to do this so calling Annotation(AnnotationTree t, Annotation a) directly may not work.
I'm assuming you are calling Adjuster.merge(Annotation first, Annotation second). To my knowledge this works. If it's not working for you can you a case to reproduce what you are seeing.
Thanks...Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your help..
Yes you are right I was calling Adjuster.merge(Annotation first, Annotation second). But there was problem in my parameters thats why it was not creating the correct result, I corrected my error and its done now..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any code written for merging or splitting AnnotationFiles? I have a large file that has been annotated and I want to split both the text file and the annotation file in half so that the two smaller text files both have annotation files. The two text files with their associated annotation files could then be opened independently.
Just thought I would ask in the off chance....
A while ago I wrote some code to append two annotation files together. It's in: org.annotation.wordfreak.util.Merger.java As far as I know there isn't anything to split files up. Hope this helps...Tom
Yesterday I ran into a need for spliting out part of an annotation file into its own file. Merger now is renamed Adjuster and it now contains both:
static AnnotationFile split(Annotaiton a)
static AnnotaitonFile merge(Annotation a, Annotation b)
Enjoy...Tom
Hi,
I know this thread is very old but I have few queries about Merging the annotaion file, thats why writing here. First of all I can't create an instance of Annotation class by calling its constructor in Adjuster.java file, I was trying to call following constructor:
public Annotation(AnnotationTree tree, Span span) {
init(tree, span, null, null, 0, null);
}
I don't know why it is not allowing me to call this constructor here?
Second thing I was trying to merge two annotation files(.ann files) by calling merge method but it didn't merge the entire annotation into the single annotation file, I am getting the head information but it doesn't give entire annotation in it. Do I need to give extra information? Please suggest..
Thanks in advance.
Rsahay.
Hi,
> First of all I can't create an instance of Annotation class by calling its constructor in Adjuster.java
> file, I was trying to call following constructor:
> public Annotation(AnnotationTree tree, Span span) {
> init(tree, span, null, null, 0, null);
> }
Not sure what you are asking here. That constructor isn't called in Adjuster (I'm looking at the code in HEAD) Adjuster calls Annotation.adjustedAnnotation to build the annotation. It's probably the case that Annotation needs data that is private to it to do this so calling Annotation(AnnotationTree t, Annotation a) directly may not work.
I'm assuming you are calling Adjuster.merge(Annotation first, Annotation second). To my knowledge this works. If it's not working for you can you a case to reproduce what you are seeing.
Thanks...Tom
Thanks for your help..
Yes you are right I was calling Adjuster.merge(Annotation first, Annotation second). But there was problem in my parameters thats why it was not creating the correct result, I corrected my error and its done now..