cite-architecture / ohco2

A cross-platform library for working with collections of texts in the OHCO2 model
https://cite-architecture.github.io/ohco2/
GNU General Public License v3.0
2 stars 1 forks source link

Corpus.nextUrn and Corpus.prevUrn don't work correctly, BUT… #103

Closed Eumaeus closed 6 years ago

Eumaeus commented 7 years ago

... see the pull-request. Changed ~~ to >= in prev and next functions for the Corpus object. Added tests for that in CorpusPrevNextSpec.

neelsmith commented 7 years ago

Is it possible to describe and document this in the issue tracker rather than a pull request?

Eumaeus commented 7 years ago

In Corpus.scala

Replaced ~~ with >= at lines: 663, 669, 692, and 699.

Added 6 texts in CorpusPrevNextSpec.scala.

neelsmith commented 7 years ago

What is the issue, though? Anything more concrete than "not correct"?

Eumaeus commented 7 years ago

Asking for corpus.prevUrn(CtsUrn("urn:cts:greekLit:tlg0012.tlg001.perseus_grc2:2.1")) returns:

Some(urn:cts:greekLit:tlg0012.tlg001.perseus_grc2:1.596-1.611)

Asking for corpus.nextUrn(CtsUrn("urn:cts:greekLit:tlg0012.tlg001.perseus_grc2:2.1")) returns:

Some(urn:cts:greekLit:tlg0012.tlg001.perseus_grc2.lemmata:2.2.1-2.4.3)

Eumaeus commented 6 years ago

Fixed and tested.