Conversation
e470334 to
9b98673
Compare
9b98673 to
7fbc869
Compare
| } | ||
| } | ||
|
|
||
| impl<R: Read> Iterator for NTriples<R> { |
There was a problem hiding this comment.
<...> <http://a.org/knows> <...>
<...> <http://b.org/knows> <...>
We lose info about difference between these two predicates if use LocalName. Is it good?
There was a problem hiding this comment.
Decided to get rid of local name extraction strategy and stick to fulliri always
src/formats/nt.rs
Outdated
| } else if let Some(pos) = iri.rfind('/') { | ||
| iri[pos + 1..].to_owned() | ||
| } else { | ||
| iri.to_owned() |
There was a problem hiding this comment.
can we obtain something like <...> <http://a.org/> <...>? In this case predicate will be empty "". Should we handle this case?
There was a problem hiding this comment.
Same as above answer
|
@VanyaGlazunov Nice. Can you answer on my questions in review? |
| } | ||
|
|
||
| #[cfg(test)] | ||
| mod tests { |
There was a problem hiding this comment.
Could you, please, introduce a test involving non-ascii chars. Especially I am interested in Chinese and Cyrillic support.
There was a problem hiding this comment.
Added test with russain and chinese alice and bob
georgiy-belyanin
left a comment
There was a problem hiding this comment.
Thank you for working on this! Consider, please, my comment and Rodion's one.
There was a problem hiding this comment.
Pull request overview
Adds a new RDF N-Triples format parser and wires it into the in-memory graph builder so graphs can be loaded directly from .nt sources (per Issue #3).
Changes:
- Introduces
formats::nt::NTriples<R>iterator (backed byoxttl) to parse N-Triples intoEdgeitems. - Adds
GraphSource<InMemoryBuilder>support forNTriples<R>and a corresponding in-memory loading test. - Updates
formatsmodule exports and repo documentation to include the new format.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/graph/mod.rs | Minor formatting adjustment in check_graph signature. |
| src/graph/inmemory.rs | Imports NTriples, implements GraphSource for it, and adds an in-memory load test. |
| src/formats/nt.rs | New N-Triples parser/iterator implementation with label-extraction strategy and unit tests. |
| src/formats/mod.rs | Exposes nt module + NTriples re-export; extends FormatError with N-Triples-related variants. |
| AGENTS.md | Documents the new nt.rs format module and usage details. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
96e108b to
58506ae
Compare
58506ae to
db21f19
Compare
db21f19 to
1640c75
Compare
Adds support for loading graphs from RDF N-Triples format as a new edge source.
closes #3 I think.