Skip to content

Releases: annotation/stam-rust

v0.13.0

14 May 10:30
Compare
Choose a tag to compare

New features:

  • Implemented deletion #3
  • Updates to the query language (STAMQL) and engine:
    • New ADD and DELETE statements in STAMQL queries for editing data. Added a method AnnotationStore.query_mut() to run such queries that require mutability.
    • New OFFSETmodifier for RESOURCE and ANNOTATION result types in STAMQL.

Minor API improvements:

  • Added conversion of Cursor to usize and isize
  • Implemented conversion from std::io::Error for StamError

Miscellaneous:

  • Refactored contextvars implementation in query engine
  • Updated dependencies

Bugfixes:

  • Fixed writing stand-off files
  • Added missing implementations in resolving DataKeySelector, AnnotationDataSelector
  • In segmentation(), do not include seegments that have no annotations (e.g. milestones)

v0.12.0

28 Mar 11:01
Compare
Choose a tag to compare

Fairly minor update release:

New features:

  • Added a segmentation() method for ResultItem and ResultTextSelection, providing all non-overlapping text segments that together fully cover the resource/text selection
  • Generate body IDs in Web Annotation output

Fixes:

  • Query: Added DATASET primary constraint for ANNOTATION result type

v0.11.0

15 Mar 17:13
Compare
Choose a tag to compare

New features:

  • Implemented STAM Transpose extension: a transpose() function is now available on Annotation and TextSelectionSets #28
  • Implemented UNION constraint in the STAM Query Language #26
  • Exposed functions for ID (re)generation (IdStrategy, generate_id(), regenerate_id())
  • Implemented TextSelection.intersection()

Minor API improvements:

  • Implemented missing high-level iterator for AnnotationDataSet
  • added Offset.len(), Cursor.shift() and Offset.shift()
  • added ResultItem<Annotation>.textselectionsets(), ResultItem<Annotation>.textselectionset_in()
  • constrained the characters used in randomly generated IDs to include only alphanumeric ones
  • better error feedback in querying
  • extra inspection methods for AnnotationBuilder and SelectionBuilder

Bugfixes:

  • Fixed serialisation of webannotations and added supported for internal range selectors
  • Fixes for merging multiple annotation stores
  • Implemented several missing constraint handler for the query language

There was also some refactoring and dependency upgrades.

v0.10.1

22 Feb 16:09
Compare
Choose a tag to compare

New features:

  • Implemented DataValue::Datetime (#27), which was in the official specification but not yet implemented until now
  • Implemented support for W3C Web Annotation export (JSON-LD) of Annotations (#4)
  • Implemented STAM JSON serialisation for TextSelection (even though it doesn't appear in a normal STAM JSON output)

Minor API improvements:

  • Implemented TextResource.to_json()
  • Implemented TextSelection.absolute_offset()
  • Implemented a better API to get a textselection of a whole resource, e.g. using From trait
  • Implemented QueryResultItems.get_by_name_or_first() and QueryResultItems.get_by_name_or_last()
  • Exposed a common generate_id() function

Bugfixes:

  • Fix for AnnotationStore.add_resource(filename=)

v0.9.0

24 Jan 12:28
Compare
Choose a tag to compare

This is a major update that significantly changes the high-level API and
introduces a query implementation. We have now entered a stage in which the API
is stabilising and can be actively used.

  • New high-level API, with documentation.
    • Introduces traits AnnotationsIterator, DataIterator, ResourcesIterator, TextSelectionIterator.
    • Added Handles<T> structure to hold collections (type aliases Annotations,Data, TextSelections,Resources).
    • Many new filter* methods
    • Major refactoring in large code parts
  • A query language (STAMQL) and query engine have been implemented. (#14)
  • Two new selectors were added to the core model: DataKeySelector and AnnotationDataSelector (#25)
  • Implemented AnnotationStore.find_text_nocase() method
  • Various bugfixes, and other minor improvements.

Important note: This release breaks backward-compatibility in a number of ways as the API has been overhauled again. This should be the last such major overhaul.

v0.8.0

19 Oct 08:52
Compare
Choose a tag to compare

This is a major new release that introduces a new high-level API, allowing for elaborate search of annotations, data, text selections:

  • New high-level API, with documentation
    * New iterators AnnotationsIter, DataIter and TextSelectionsIter.
    * New collections Annotations, Data.
    * Iterators have a parallel() method to initiate parallelisation from that point on.
  • Made a split between the low-level API and high-level API, certain parts of the low-level API are no longer exposed publicly.
  • Implemented binary (de)serialisation using CBOR (#13 )
  • CompositeSelectors and MultiSelectors adhere to textual order (#21)
  • Internal ranged selectors reduce the memory footprint for complex selectors (#15)
  • Implemented temporary public IDs in cases where no public IDs have been assigned; also added the option to strip IDs from existing annotations/data.
  • Methods for introspection regarding memory usage
  • Major improvements in memory consumption (contained an important bug)
  • Major refactoring, numerous bugfixes, performance improvements, etc...

The above is just a limited summary of the most important changes, consult the git log for details.

Important note: This release breaks backward-compatibility in a number of ways as the API has been overhauled completely! We hope to avoid similar large breakages in the future.

v0.7.2

21 Jun 13:41
Compare
Choose a tag to compare
  • bug fix for stack overflow error in various iterators
  • implemented test_data() methods on Annotation and AnnotationDataSet
  • AnnotationData::test() renamed to AnnotationData::test_value(), added a new higher-level test() method

v0.7.1

08 Jun 18:52
Compare
Choose a tag to compare

Minor correction, previous version tagged the wrong commit

v0.7.0

07 Jun 10:43
Compare
Choose a tag to compare
  • find_data() has been reimplemented and now returns an iterator, the old-style version is renamed to data_by_value()
  • implemented find_text_nocase()
  • implemented find_text_sequence() for finding/aligning text sequences
  • added TextResource.with_filename()
  • minor fixes
  • updated dependencies

v0.6.0

19 Apr 11:06
Compare
Choose a tag to compare

This release is now ready for use by the general public, even though there may still be API changes in the future, the biggest ones are now behind us:

  • Implemented a higher-level API. This is generally implemented on the new WrappedItem<T> structure which wraps various STAM data structures in a fat pointer that also references the underlying store.
  • Implemented find_textselections() and find_annotations() method that use TextSelectionOperator to find textselections/annotations that are in a specific textual relationship (overlap, embedding, adjacency, etc..).
  • Implemented a Text trait that consolidates all operations on text. It is implemented for TextResource and TextSelection.
    • Contains methods like split_text(), trim_text(), find_text(), find_text_regex()... all returning text selections (retaining offset information)
  • Renamed various data types:
    • SearchTextIter -> FindRegexIter
    • AnyId -> Item , and major refactoring that allows borrowed as well as owned forms now.
  • Implemented Clone for more data types.
  • Major refactoring
    • Removed a decent amount of redundancy
    • Made various structure parameters private, use getters/setters to access them
    • Improved builder patterns
  • Numerous bugfixes
  • Added more benchmarks
  • Added a cool logo