Skip to content

Commit

Permalink
Fixed type of genealogical_comparison::cost from int to float; update…
Browse files Browse the repository at this point in the history
…d textual_flow to copy readings list from variation unit and use it for retrieving clusters in coherence_in_variant_passages_to_dot; updated images and readme
  • Loading branch information
Joey McCollum committed Jan 17, 2020
1 parent 05e1d69 commit db02faa
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 22 deletions.
12 changes: 0 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ matrix:
- cmake .. #invoke CMake, placing the build in the build directory
- make #build using the generated Makefile
- make test #test using the generated Makefile
- src/populate_db --drop-ambiguous ../examples/3_john_collation.xml cache.db
- src/optimize_substemmata cache.db 2464
- rm cache.db
#MacOS, clang
- os: osx
compiler: clang
Expand All @@ -23,9 +20,6 @@ matrix:
- cmake .. #invoke CMake, placing the build in the build directory
- make #build using the generated Makefile
- make test #test using the generated Makefile
- src/populate_db --drop-ambiguous ../examples/3_john_collation.xml cache.db
- src/optimize_substemmata cache.db 2464
- rm cache.db
#Windows, Visual Studio
- os: windows
script:
Expand All @@ -34,9 +28,6 @@ matrix:
- cmake .. #invoke CMake, placing the build in the build directory
- cmake --build . --config Debug #build in Debug mode using CMake
- ctest -C Debug #test using CTest
- src/Debug/populate_db.exe --drop-ambiguous ../examples/3_john_collation.xml cache.db
- src/Debug/optimize_substemmata.exe cache.db 2464
- rm cache.db
#Windows, g++ and make via MinGW
- os: windows
script:
Expand All @@ -45,6 +36,3 @@ matrix:
- cmake -DCMAKE_SH="CMAKE_SH-NOTFOUND" -G "MinGW Makefiles" .. #invoke CMake, placing the build in the build directory
- mingw32-make #build using the generated Makefile
- test/autotest #test manually
- src/populate_db.exe --drop-ambiguous ../examples/3_john_collation.xml cache.db
- src/optimize_substemmata.exe cache.db 2464
- rm cache.db
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Fast, compact, open-source, TEI-compliant C++ implementation of the Coherence-Ba

The Coherence-Based Genealogical Method (CBGM) is a novel approach to textual criticism, popularized by the Institut für Neutestamentliche Textforschung (INTF) for its use in the production of the _Editio Critica Maior_ (_ECM_) of the New Testament. It is a meta-method, combining methodology-dependent philological decisions from the user with efficient computer-based calculations to highlight genealogical relationships between different stages of the text. To establish genealogical relationships in the presence of contamination (understood to be a problem in the textual tradition of the New Testament), the CBGM makes a number of philosophical and methodological innovations, such as the abstracting of texts away from the manuscripts that preserve them (and the resulting rejection of hypothetical ancestors as used in traditional stemmata), the encoding of the textual critic's decisions in local stemmata of variants, and the use of coherence in textual flow to evaluate hypotheses about the priority of variant readings.

To learn more about the CBGM, see Tommy Wasserman and Peter J. Gurry, _A New Approach to Textual Criticism: An Instroduction to the Coherence-Based Genealogical Method_, RBS 80 (Atlanta: SBL Press, 2017); Peter J. Gurry, _A Critical Examination of the Coherence-Based Genealogical Method in the New Testament_, NTTSD 55 (Leiden: Brill, 2017); and Gerd Mink, "Problems of a Highly Contaminated Tradition: The New Testament: Stemmata of Variants as a Source of Genealogy for Witnesses," in Pieter van Reenen, August den Hollander, and Margot van Mulken, eds., _Studies in Stemmatology II_ (Philadelphia, PA: Benjamins, 2004), 13–85.
To learn more about the CBGM, see Tommy Wasserman and Peter J. Gurry, _A New Approach to Textual Criticism: An Introduction to the Coherence-Based Genealogical Method_, RBS 80 (Atlanta: SBL Press, 2017); Peter J. Gurry, _A Critical Examination of the Coherence-Based Genealogical Method in the New Testament_, NTTSD 55 (Leiden: Brill, 2017); Andrew Charles Edmondson, "An Analysis of the Coherence-based Genealogical Method Using Phylogenetics" (PhD diss., University of Birmingham, 2019); and Gerd Mink, "Problems of a Highly Contaminated Tradition: The New Testament: Stemmata of Variants as a Source of Genealogy for Witnesses," in Pieter van Reenen, August den Hollander, and Margot van Mulken, eds., _Studies in Stemmatology II_ (Philadelphia, PA: Benjamins, 2004), 13–85.

### Design Philosophy

Expand Down Expand Up @@ -144,7 +144,7 @@ So if we wanted to create a new database called cache.db using the 3\_john\_coll

./populate_db -t 100 -z defective -z orthographic --drop-ambiguous examples/3_john_collation.xml cache.db

Please note that at this time, the current database must be overwritten, or a separate one must be created, in order to incorporate any changes to the processing options.
Please note that at this time, the current database must be overwritten, or a separate one must be created, in order to incorporate any changes to the processing options or to the local stemmata.

To illustrate the effects of the processing arguments, we present several versions of the local stemma for the variation unit at 3 John 1:4/22–26, along with the commands used to populate the database containing their data. In the local stemmata presented below, dashed arrows represent edges of weight 0.

Expand Down
Binary file modified images/global-stemma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/optimize_substemmata_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/optimize_substemmata_5_bound_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions include/textual_flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class textual_flow {
private:
string label;
int connectivity;
list<string> readings;
textual_flow_graph graph;
public:
textual_flow();
Expand Down
2 changes: 1 addition & 1 deletion include/witness.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace std;
struct genealogical_comparison {
Roaring agreements;
Roaring explained;
int cost;
float cost;
};

class witness {
Expand Down
6 changes: 3 additions & 3 deletions src/print_textual_flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ list<string> get_readings_for_variation_unit(sqlite3 * input_db, const string &
list<string> readings = list<string>();
int rc; //to store SQLite macros
sqlite3_stmt * select_from_readings_stmt;
sqlite3_prepare(input_db, "SELECT * FROM READINGS WHERE READINGS.VARIATION_UNIT=?", -1, & select_from_readings_stmt, 0);
sqlite3_prepare(input_db, "SELECT * FROM READINGS WHERE READINGS.VARIATION_UNIT=? ORDER BY ROWID", -1, & select_from_readings_stmt, 0);
sqlite3_bind_text(select_from_readings_stmt, 1, vu_id.c_str(), -1, SQLITE_STATIC);
rc = sqlite3_step(select_from_readings_stmt);
while (rc == SQLITE_ROW) {
Expand Down Expand Up @@ -192,7 +192,7 @@ local_stemma get_local_stemma_for_variation_unit(sqlite3 * input_db, const strin
//Add the vertices of the local stemma:
graph.vertices = list<local_stemma_vertex>();
sqlite3_stmt * select_from_readings_stmt;
sqlite3_prepare(input_db, "SELECT * FROM READINGS WHERE READINGS.VARIATION_UNIT=?", -1, & select_from_readings_stmt, 0);
sqlite3_prepare(input_db, "SELECT * FROM READINGS WHERE READINGS.VARIATION_UNIT=? ORDER BY ROWID", -1, & select_from_readings_stmt, 0);
sqlite3_bind_text(select_from_readings_stmt, 1, vu_id.c_str(), -1, SQLITE_STATIC);
rc = sqlite3_step(select_from_readings_stmt);
while (rc == SQLITE_ROW) {
Expand All @@ -205,7 +205,7 @@ local_stemma get_local_stemma_for_variation_unit(sqlite3 * input_db, const strin
//Add the edges of the local_stemma:
graph.edges = list<local_stemma_edge>();
sqlite3_stmt * select_from_reading_relations_stmt;
sqlite3_prepare(input_db, "SELECT * FROM READING_RELATIONS WHERE READING_RELATIONS.VARIATION_UNIT=?", -1, & select_from_reading_relations_stmt, 0);
sqlite3_prepare(input_db, "SELECT * FROM READING_RELATIONS WHERE READING_RELATIONS.VARIATION_UNIT=? ORDER BY ROWID", -1, & select_from_reading_relations_stmt, 0);
sqlite3_bind_text(select_from_reading_relations_stmt, 1, vu_id.c_str(), -1, SQLITE_STATIC);
rc = sqlite3_step(select_from_reading_relations_stmt);
while (rc == SQLITE_ROW) {
Expand Down
8 changes: 4 additions & 4 deletions src/textual_flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ textual_flow::textual_flow() {
* and a list of witnesses whose potential ancestors have been set.
*/
textual_flow::textual_flow(const variation_unit & vu, const list<witness> & witnesses) {
//Copy the label and connectivity from the variation unit:
//Copy the label, readings, and connectivity from the variation unit:
label = vu.get_label();
readings = vu.get_readings();
connectivity = vu.get_connectivity();
//Get the variation unit's local stemma:
local_stemma ls = vu.get_local_stemma();
Expand Down Expand Up @@ -430,9 +431,8 @@ void textual_flow::coherence_in_variant_passages_to_dot(ostream & out, bool flow
}
}
//Add a cluster for each reading, including all of the nodes it contains:
for (pair<string, list<string>> kv : clusters) {
string rdg = kv.first;
list<string> cluster = kv.second;
for (string rdg : readings) {
list<string> cluster = clusters.at(rdg);
out << "\tsubgraph cluster_" << rdg << " {\n";
out << "\t\tlabeljust=\"c\";\n";
out << "\t\tlabel=\"" << rdg << "\";\n";
Expand Down

0 comments on commit db02faa

Please sign in to comment.