Hydrate¶
-
AQPython.Utilities.
Hydrate
(df, txtPath, excludes=True)¶ This function will retrieve the text for each AQAnnotation in the passed Dataframe of AQAnnotations, populate the text property with this value in the AQAnnotation, and return a Dataframe of AQAnnotations with the text property populated.
Keep in mind that for ‘text/word’ annotations the orig column will already be populated with the ‘original’ text value so this may not be needed. However, if you are working with sentence annotations (and other similar annotations) this could prove to be very helpful.
- Parameters
df – The Dataframe of Annotations that we want to populate the text property with the text for this annotation
textPath – Path the str files. The str files for the documents in the ds annotations must be found here.
excludes – Whether we want to include the ‘excludes’ text. True means exclude the excluded text.
- Returns
Dataframe of AQAnnotations