Treora opened a new pull request #98:
URL: https://github.com/apache/incubator-annotator/pull/98


   Finally.
   
   - Addresses #75 (support TextPositionSelector)
   - Addresses #85 (Chunking abstraction); because having two selectors dealing 
with text was the right moment to introduce such abstractions. Now the logic of 
matching&describing a selector is in the selector package, and operates on 
Chunks (an arbitrary object wrapping a string). Hence the dom package’s main 
task now is to merely convert a Range into a sequence of chunks (one chunk per 
text node), and call the abstract implementation with that.
   - Reintroduces Range normalisation (see #51), implemented from scratch.
   - Reimplements and remove need for dom-seek dependency.
   - Updates the demo to show TextPosition, adding a smiley (= two code units) 
and some elements to make it more challenging.
   
   Things to do still (can wait until after merging):
   - Document everything better; especially the details of the chunking 
approach.
   - Make tests for the abstract match&describe implementations; test the 
abstraction layers individually (TextNodeChunker, TextSeeker, CodePointSeeker, 
normalizeRange); decide how to test the dom-specific match&describe 
implementations.
   - Possibly also document&publish the abstractions (e.g. CodePointSeeker) as 
separate components that could be helpful for other purposes than annotation.
   - Modify TextQuoteMatcher to use Seeker, not Chunker (I built further on the 
reimplementation I made in the chunking branch)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to