Skip to content

Commit

Permalink
Merge pull request #292 from korpling/feature/saltxml-exporter
Browse files Browse the repository at this point in the history
Add SaltXml exporter
  • Loading branch information
thomaskrause authored Aug 21, 2024
2 parents ff957db + f45c3cb commit e23b544
Show file tree
Hide file tree
Showing 36 changed files with 3,814 additions and 1,426 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `table` export has feature to customize n/a-value, which by default is the empty string
- Add `conllu` as export format
- import of `conllu` now supports enhanced dependencies
- Adds `saltxml` export format

### Changed

- `exmaralda` import now ranks order of tlis higher than sorting by time value (more compatible with modern EXMARaLDA files)
- `xlsx` importer will connect spans to their corresponding segmentation node
with coverage edges instead of connecting them with the base tokens generated
for the timeline items. Thus, the configured connection between spans and base
text is not lost.

### Fixed

- `exmaralda` import keeps events with missing time values

## [0.15.0] - 2024-08-14

## [0.15.0] - 2024-08-14

### Added

- New command line argument `--in-memory` that has the same meaning as setting
Expand Down
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ version = "0.15.0"
[dependencies]
ansi_term = "0.12"
anyhow = "1.0"
bimap = "0.6.3"
clap = {version = "4.0", features = ["derive", "env"]}
console = "0.15"
csv = "1.1"
documented = "0.3.0"
encoding_rs = "0.8"
encoding_rs_io = "0.1.7"
glob = "0.3"
graphannis = "3.3.3"
graphannis-core = "3.3.3"
graphannis = "3.4"
graphannis-core = "3.4"
graphviz-rust = "0.9.0"
indicatif = "0.17"
itertools = "0.12"
Expand Down Expand Up @@ -51,7 +52,7 @@ text-splitter = "0.6.3"
thiserror = "1.0"
toml = "0.8.0"
tracing-subscriber = {version = "0.3", features = ["env-filter"]}
umya-spreadsheet = "~1.1.1"
umya-spreadsheet = "2.0.1"
url = "2.5.2"
xml-rs = "0.8"
zip = "0.6.6"
Expand Down
8 changes: 5 additions & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ pub type StandardErrorResult<T> = std::result::Result<T, Box<dyn std::error::Err
pub enum AnnattoError {
#[error("Conversion failed with errors: {}", errors.iter().map(|e| e.to_string()).join("\n"))]
ConversionFailed { errors: Vec<AnnattoError> },
#[error("Error during exporting corpus from {path} with {exporter:?}: {reason:?}")]
#[error("Error during exporting corpus to {path} with {exporter:?}: {reason:?}")]
Export {
reason: String,
exporter: String,
path: PathBuf,
},
#[error("Error during importing corpus to {path} with {importer:?}: {reason:?}")]
#[error("Error during importing corpus from {path} with {importer:?}: {reason:?}")]
Import {
reason: String,
importer: String,
Expand Down Expand Up @@ -75,11 +75,13 @@ pub enum AnnattoError {
#[error("Could not parse TOML workflow file: {error}")]
TOMLError { error: String },
#[error("Could not read XSLS file: {0}")]
XlsxRead(#[from] umya_spreadsheet::reader::xlsx::XlsxError),
XlsxRead(#[from] umya_spreadsheet::XlsxError),
#[error("Error waiting for finished conversion thread")]
JoinHandle,
#[error("Glob pattern caused an error: {0}")]
GlobError(String),
#[error(transparent)]
Anyhow(#[from] anyhow::Error),
}

impl<T> From<std::sync::PoisonError<T>> for AnnattoError {
Expand Down
1 change: 1 addition & 0 deletions src/exporter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
pub mod conllu;
pub mod exmaralda;
pub mod graphml;
pub mod saltxml;
pub mod sequence;
pub(crate) mod table;
pub mod textgrid;
Expand Down
Loading

0 comments on commit e23b544

Please sign in to comment.