Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/antiques_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
let(:db) { Opencdd::Cddal.parse_file(ANTIQUES) }

it "loads every entity" do
expect(db.entities.size).to eq(148)
expect(db.entities.size).to eq(146)
end

describe "powertypes" do
Expand Down Expand Up @@ -118,8 +118,8 @@
it "carries the Met Museum Open Access bulk registry" do
codes = db.entities.map(&:code).grep(/\AANI/)
# 12 curated + 78 Met highlights, contiguous three-digit numbering
expect(codes.size).to eq(90)
expect(codes).to include("ANI013", "ANI050", "ANI090")
expect(codes.size).to eq(88)
expect(codes).to include("ANI013", "ANI050", "ANI088")
met = db.find_by_code("ANI013")
expect(met.preferred_name(:en)).to be_a(String)
expect(met.definition).to include("The Metropolitan Museum of Art")
Expand Down
41 changes: 0 additions & 41 deletions spec/poi_spec.rb

This file was deleted.

13 changes: 10 additions & 3 deletions spec/scenicspots_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
let(:db) { Opencdd::Cddal.parse_file(SCENICSPOTS) }

it "loads every entity" do
expect(db.entities.size).to eq(164)
expect(db.entities.size).to eq(804)
end

describe "powertypes" do
Expand Down Expand Up @@ -125,10 +125,17 @@
expect(inari.preferred_name(:ja)).to eq("伏見稲荷大社")
end

it "is the curated learning dictionary — the bulk registry lives in data-poi" do
it "is one real dataset: the full verified registry, no curated subset" do
indiv = db.entities.map(&:code).grep(/\ASPI/)
expect(indiv.size).to eq(26)
expect(indiv.size).to be > 600
expect(db.find_by_code("SPA019").preferred_name("zh-CN")).to eq("中國")
end

it "grades UNESCO World Heritage sites from their P757 claims" do
graded = db.entities.count do |e|
e.respond_to?(:properties) && e.properties["official_grade"] == "WorldHeritage"
end
expect(graded).to eq(32)
end
end
end
Loading