Comments (6)
Yes, that was the idea. It would be a really helpful feature!
from collatex.
@mhbeals We're reviewing open issues and wondering whether you were still interested in this feature. If so, have I understood correctly that what you'd like is output similar to the alignment table, but with commas or tabs instead of the ASCII table borders? Thanks!
from collatex.
@djbpitt Observing from afar, the projects I'm involved in will benefit from this feature as well. I've recently been adapting collateX XML output with XSLT to produce output text with TSV to import into various spreadsheet formats. This facilitates fielding comments from team members about adjusting the algorithm and editing the output.
from collatex.
@mhbeals I've added an output type of "csv" at https://github.com/djbpitt/collatex/tree/csv ("csv" branch of my fork). The Python csv writer has some configuration options, listed at https://docs.python.org/3/library/csv.html#dialects-and-formatting-parameters, and I've left them all unspecified, that is, accepted the defaults. I'll add support for tsv once we've confirmed that csv is working correctly, but in the meanwhile, I would be grateful if you could please let me know whether it does what you want, and whether you think we should set any of the formatting parameters to any value other than the default.
To test, clone my fork of the collatex repo, cd
to collatex/collatex-pythonport
, temporarily uninstall your system version of collatex with pip uninstall collatex
, check out the csv
branch, and then run a test script, while you're located inside collatex/collatex-pythonport
, either from a file or within a Jupyter Notebook. When I run:
%reload_ext autoreload
%autoreload 2
from collatex import *
collation = Collation()
collation.add_plain_witness("A", "The big gray koala")
collation.add_plain_witness("B", "The grey koala")
print(collate(collation, output="csv"))
the output is:
A,The ,big gray ,koala
B,The ,grey ,koala
from collatex.
@mhbeals I've just added a "tsv" output method to the "csv" branch of my fork, as well.
from collatex.
@mhbeals "csv" and "tsv" output methods have been included in CollateX Python 2.2.
from collatex.
Related Issues (20)
- <rdg> value in TEI output (Java) is "n", and should be "t"
- GraphML output in CollateX Python HOT 1
- Alignment error
- TEI output error (CollateX Python 2.2) HOT 1
- Regex to specify lower-priority collation tokens
- CollateX Python: Check input for duplicate witness ID and throw error if that is the case
- Choosing an algorithm HOT 6
- CollateX refuses Json input HOT 10
- JSON to TEI HOT 4
- Collatex demo api service seems to be down HOT 1
- Collating more than 2 witnesses by CollateX2.2 HOT 3
- Words in labels of dot and GraphML output are being merged HOT 4
- dependencies update HOT 2
- CollateX, bug HOT 1
- CollateX, bug, now with e-mail HOT 2
- ECMA/JavaScript Callbacks HOT 1
- Collate bug with detect_transpositions
- Unexpected error, Invalid resource: A, zsh: unknown file attribute: i HOT 9
- Can the latest Python 3.10 fix be pushed to PyPi? HOT 5
- demo service seems down (as of 2024-02-9 15:40 EST) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collatex.