JAPE Repository
These pages are designed to offer some tips and examples of doing a variety of things in JAPE.
Feel free to add to it and don't forget to look first at the chapter JAPE in the user guide.
For a complete set of grammars, have a look at ANNIE grammars to annotate named entities.
Contents
- Operators
- Shorthands
- Documents
- 1. Add a new feature to a document
- 2. Does the document already have this feature?
- 3. Remove a feature from a document
- 4. Get the value of an existing feature on a document and add it as the value of a new feature
- 5. Get string content and add it as a feature value
- 6. Get string content and add it as a feature value (if you're working with a set not an annotation)
- Annotation Basics
- 1. Get information about one annotation from inside another annotation
- 2. Annotate blindly whatever is between two annotations
- 3. Check that there is no annotation of a certain type already contained in the annotation
- 4. Find an annotation of one type and copy modified versions of its features to all contained annotations of a specified type
- 5. Iterate through the Tokens contained in an annotation
- 6. Annotate NPs within a list of NPs
- 7. Rename annotations
- 9. Split on a separator one annotation into several annotations
- 10. Join several annotations in one annotation
- Annotation Strings
- Annotations Features
- Gazetteers
- Coordinated Annotations
- Ontologies
- Miscellaneous
- JAPE examples from Graham Wilcock's book on text analytics