annotation / stam-tools Goto Github PK
View Code? Open in Web Editor NEWCommand line tools for working with standoff text annotations (STAM)
Home Page: https://annotation.github.io/stam
License: GNU General Public License v3.0
Command line tools for working with standoff text annotations (STAM)
Home Page: https://annotation.github.io/stam
License: GNU General Public License v3.0
Though I already have a TEI-> FoLiA-> STAM conversion, I'd like to also have something more generic that would work for formats like TEI XML, and HTML. It would do a fairly straightforward one-on-one mapping/untangling from XML elements to STAM annotations (and plain text output) and XML attribute to annotation data. The underlying presumption is that all XML text nodes in a document constitute the actual text (in order without redundancy; perhaps with some parametrised format-specific exemptions).
$ stam query -F json --query "SELECT ANNOTATION ?letter WHERE ID hoof001hwva02_01_0275;" hoof001hwva.store.stam.json
[{
"letter": {
"@type": "Annotation",
"@id": "hoof001hwva02_01_0275",
"target": {
"@type": "TextSelector",
"resource": "hoof001hwva02.txt",
"offset": {
"@type": "Offset",
"begin": {
"@type": "BeginAlignedCursor",
"value": 1231033
},
"end": {
"@type": "BeginAlignedCursor",
"value": 1233344
}
}
},
"data": [
{
"@type": "AnnotationData",
"@id": "!D16",
"set": "brieven-van-hooft-categories"
},
{
"@type": "AnnotationData",
"@id": "!D1",
"set": "brieven-van-hooft-categories"
},
implemented but not yet documented
Implement a stam batch
or stam shell
subcommand that loads a give annotation store (or multiple) and then executes each of the lines on standard input as if they were new subcommands to the stam
tool, but without reloading or saving the data. Saving should be deferred to the end.
Add an option to keep alignments as minimal as possible, stripping and leading/trailing whitespace
Implement TSV (possibly also CSV but let's keep it simple) to STAM conversion.
Write a CLI tool that outputs a visualisation of a text (a TextSelection) with
its annotations. The visualisation would be a static HTML page, optionally with
SVG and/or some embedded Javascript. Existing libraries like
https://github.com/recogito/recogito-js/ could provide a solution.
Annotations could either be shown on mouse-over, or already indicated with some form of highlighting.
Challenges are when annotations overlap and when they overlap accross nesting boundaries.
Using Smith Waterman/Needleman Wunsch and producing transposition annotations as specified in https://github.com/annotation/stam/tree/master/extensions/stam-transpose
This requires some extra work on top of our TSV import (#1). As a common format in the field, support for CONLL-U/X would make it easy to get linguistically annotated data into STAM.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.