XML : Ternip can't format a string

I'm trying to use the library Ternip to add temporay tags to text..

In order to preprocess a document I have to run it through one of the annotators, and I am currently using the TIMEX3 one.

Now it states that it is supposed to accept an XML document, and I am not entirely sure how to put that in. If I try to put in a string using.

  TT = Timex3XmlDocument(sampledoc)    

I got the following error:

      221         parser = self.getParser()      222         try:  --> 223             parser.Parse(string, True)      224             self._setup_subset(string)      225         except ParseEscape:    ExpatError: syntax error: line 1, column 0    

Any Idea how I can properly input documents in order for them to be properly annotated?

No comments:

Post a Comment