refactoring IDocument and SentenceAnnotation