Skip to content

Commit f868294

Browse files
committed
Added documentation to clarify that term canonicalization is not the same as Graph/Dataset canonicalization, which is impleented in the rdf-normalize gem.
1 parent 018969c commit f868294

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

lib/rdf/cli.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ module RDF
6060
# RDF::CLI::Option.new(
6161
# symbol: :canonicalize,
6262
# on: ["--canonicalize"],
63-
# description: "Canonicalize input/output.") {true},
63+
# description: "Canonicalize URI/literal forms.") {true},
6464
# RDF::CLI::Option.new(
6565
# symbol: :uri,
6666
# on: ["--uri STRING"],

lib/rdf/model/statement.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def terms
411411
end
412412

413413
##
414-
# Canonicalizes each unfrozen term in the statement
414+
# Canonicalizes each unfrozen term in the statement.
415415
#
416416
# @return [RDF::Statement] `self`
417417
# @since 1.0.8

lib/rdf/reader.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def self.options
133133
on: ["--canonicalize"],
134134
control: :checkbox,
135135
default: false,
136-
description: "Canonicalize input/output.") {true},
136+
description: "Canonicalize URI/literal forms") {true},
137137
RDF::CLI::Option.new(
138138
symbol: :encoding,
139139
datatype: Encoding,
@@ -271,7 +271,7 @@ def to_sym
271271
# the base URI to use when resolving relative URIs (not supported by
272272
# all readers)
273273
# @param [Boolean] canonicalize (false)
274-
# whether to canonicalize parsed literals
274+
# whether to canonicalize parsed URIs and Literals.
275275
# @param [Encoding] encoding (Encoding::UTF_8)
276276
# the encoding of the input stream
277277
# @param [Boolean] intern (true)
@@ -608,7 +608,9 @@ def validate?
608608
end
609609

610610
##
611-
# Returns `true` if parsed values should be canonicalized.
611+
# Returns `true` if parsed values should be in canonical form.
612+
#
613+
# @note This is for term canonicalization, for graph/dataset canonicalization use `RDF::Normalize`.
612614
#
613615
# @return [Boolean] `true` or `false`
614616
# @since 0.3.0

lib/rdf/writer.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ def validate?
392392
end
393393

394394
##
395-
# Returns `true` if terms should be canonicalized.
395+
# Returns `true` if terms should be in canonical form.
396+
#
397+
# @note This is for term canonicalization, for graph/dataset canonicalization use `RDF::Normalize`.
396398
#
397399
# @return [Boolean] `true` or `false`
398400
# @since 1.0.8

0 commit comments

Comments
 (0)