Repository navigation
Doc.save_conllu; lima command writes CoNLL-U with metadata - #50
Merged
Merged
Conversation
Doc.save_conllu(path, doc_id=None) saves to_conllu() to a UTF-8 file with Unix line endings. to_conllu(doc_id) adds a "# newdoc id" comment and "<doc_id>-<n>" sentence ids, unique in a file of several documents; the default output is unchanged. The lima command writes CoNLL-U with the metadata comments instead of repr(doc), to stdout or -o/--output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8.
Doc.to_conllu()already wrote the# sent_idand# textmetadata. This PR adds the missing parts:Doc.save_conllu(path, doc_id=None): writesto_conllu()to a file in UTF-8 with Unix line endings, so the Windows wheel doesn't write CRLF.Doc.to_conllu(doc_id=None): with an id, adds a# newdoc idcomment and makes the sentence ids<doc_id>-<n>, so they stay unique when several documents share a file. Without an id the output is unchanged.limacommand: writes CoNLL-U with the metadata comments instead ofrepr(doc), to stdout or to-o/--output. With several input files, each file's name is its document id. Input files are read as UTF-8.test_save_conllu, which needs no models (it builds the doc withfrom_conllu), plus updates to CHANGES (## Unreleased) and README.The new test was not run locally because the extension isn't built here; it runs in CI.
🤖 Generated with Claude Code