詞表 czns
這是 命名空間裡那些自定義類與屬性的機讀定義:四個類、七個屬性,用 Turtle 與 JSON-LD 各寫一份。有了它,czns:IntangibleHeritage 不再只是一個指向頁面錨點的名字,而是一個有定義、有取值範圍的術語。
一、這份詞表包含什麼
四個類:IntangibleHeritage(非遺項目)、Guide(行程編排)、FoodItem(飲食品類)、Fact(事實條目)。七個屬性:pageType、subjectType、cluster、charCount、hasSourceSection、claim、verifiedOn。每個都給 rdfs:label、rdfs:comment 與 rdfs:range;類給 rdfs:subClassOf。
為什麼要寫 rdfs:comment 而不是只列名字:因為幾個術語的邊界正是被誤用過的地方。比如 FoodItem 的註釋裡明寫「不使用 schema:FoodEstablishment——那指餐廳、飲食店等經營場所」;verifiedOn 的註釋裡明寫「與 schema:dateModified 不是一回事,不合並」。這些說明寫在詞表裡,比寫在一篇文章裡更難被繞過。
二、Turtle
@prefix czns: <https://chaoshanwiki.com/ns/#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix schema: <https://schema.org/> .
<https://chaoshanwiki.com/ns/#> a owl:Ontology ;
rdfs:label "潮俗網詞表 czns"@zh ;
rdfs:comment "定義本站自有的類與屬性。前綴 czns: 展開為 https://chaoshanwiki.com/ns/# 。"@zh ;
owl:versionInfo "2026-10-19" .
czns:IntangibleHeritage a owl:Class ;
rdfs:label "非遺項目"@zh ;
rdfs:comment "對應國家級非物質文化遺產代表性項目名錄中的項目或子項。頁內須標編號、序號、批次與申報地區;項目名用名錄原名,不做簡寫。"@zh ;
rdfs:subClassOf schema:Thing .
czns:Guide a owl:Class ;
rdfs:label "行程編排"@zh ;
rdfs:comment "按城市與天數編排的路線頁。區別於 schema:TouristTrip——後者的行程項是結構化的 itinerary,本類不承諾該結構。"@zh ;
rdfs:subClassOf schema:Thing .
czns:FoodItem a owl:Class ;
rdfs:label "飲食品類"@zh ;
rdfs:comment "菜、粿、茶這一類文化品類。不使用 schema:FoodEstablishment——那指餐廳、飲食店等經營場所。"@zh ;
rdfs:subClassOf schema:Thing .
czns:Fact a owl:Class ;
rdfs:label "事實條目"@zh ;
rdfs:comment "單一可核查主張的記錄。一條只表達一件事;複合說法須拆分。"@zh ;
rdfs:subClassOf schema:Thing .
czns:pageType a owl:DatatypeProperty ;
rdfs:label "頁面類型"@zh ;
rdfs:comment "頁面本身是什麼。取值:Article、CollectionPage、WebPage、Dataset、FAQPage、DefinedTermSet。"@zh ;
rdfs:range xsd:string .
czns:subjectType a owl:DatatypeProperty ;
rdfs:label "主體類型"@zh ;
rdfs:comment "頁面主要描述的對象是什麼。取值:Person、Place、TouristAttraction、Event、czns:IntangibleHeritage、czns:Guide、czns:FoodItem、DefinedTermSet、Thing。"@zh ;
rdfs:range xsd:string .
czns:cluster a owl:DatatypeProperty ;
rdfs:label "跨語言簇"@zh ;
rdfs:comment "同一內容各語言版本共用的值,取母本 slug,用於把五種語言的分支認作同一對象。"@zh ;
rdfs:range xsd:string .
czns:charCount a owl:DatatypeProperty ;
rdfs:label "正文用字數"@zh ;
rdfs:comment "去標籤、去空白後的字符數,含標點與拉丁字符;不含 script、style 標籤內的嵌入數據(如事實清單的 JSON)。"@zh ;
rdfs:range xsd:integer .
czns:hasSourceSection a owl:DatatypeProperty ;
rdfs:label "設有來源節"@zh ;
rdfs:comment "該頁是否設「來源」一節。"@zh ;
rdfs:range xsd:boolean .
czns:claim a owl:DatatypeProperty ;
rdfs:label "事實斷言"@zh ;
rdfs:comment "一條可獨立核查的陳述。不使用 schema:text——那表示某作品的正文。"@zh ;
rdfs:range xsd:string .
czns:verifiedOn a owl:DatatypeProperty ;
rdfs:label "核查日期"@zh ;
rdfs:comment "該條事實最後核對通過的日期。與 schema:dateModified(頁面修改日期)不是一回事,不合並。"@zh ;
rdfs:range xsd:date .
三、JSON-LD
同一份內容,換成 JSON-LD。這個圖另整段嵌在 script#cz-vocab-json 裡,類型為 application/ld+json——不執行腳本也能取到,爬蟲與解析器都能直接讀。
{
"@context": {
"@vocab": "https://chaoshanwiki.com/ns/#",
"czns": "https://chaoshanwiki.com/ns/#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"owl": "http://www.w3.org/2002/07/owl#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"schema": "https://schema.org/",
"@language": "zh",
"label": {
"@id": "rdfs:label"
},
"comment": {
"@id": "rdfs:comment"
},
"subClassOf": {
"@id": "rdfs:subClassOf",
"@type": "@id"
},
"range": {
"@id": "rdfs:range",
"@type": "@id"
}
},
"@graph": [
{
"@id": "https://chaoshanwiki.com/ns/#",
"@type": "owl:Ontology",
"label": "潮俗網詞表 czns",
"comment": "定義本站自有的類與屬性。前綴 czns: 展開為 https://chaoshanwiki.com/ns/# 。",
"owl:versionInfo": {
"@value": "2026-10-19",
"@language": null
}
},
{
"@id": "czns:IntangibleHeritage",
"@type": "owl:Class",
"label": "非遺項目",
"comment": "對應國家級非物質文化遺產代表性項目名錄中的項目或子項。頁內須標編號、序號、批次與申報地區;項目名用名錄原名,不做簡寫。",
"subClassOf": "schema:Thing"
},
{
"@id": "czns:Guide",
"@type": "owl:Class",
"label": "行程編排",
"comment": "按城市與天數編排的路線頁。區別於 schema:TouristTrip——後者的行程項是結構化的 itinerary,本類不承諾該結構。",
"subClassOf": "schema:Thing"
},
{
"@id": "czns:FoodItem",
"@type": "owl:Class",
"label": "飲食品類",
"comment": "菜、粿、茶這一類文化品類。不使用 schema:FoodEstablishment——那指餐廳、飲食店等經營場所。",
"subClassOf": "schema:Thing"
},
{
"@id": "czns:Fact",
"@type": "owl:Class",
"label": "事實條目",
"comment": "單一可核查主張的記錄。一條只表達一件事;複合說法須拆分。",
"subClassOf": "schema:Thing"
},
{
"@id": "czns:pageType",
"@type": "owl:DatatypeProperty",
"label": "頁面類型",
"comment": "頁面本身是什麼。取值:Article、CollectionPage、WebPage、Dataset、FAQPage、DefinedTermSet。",
"range": "xsd:string"
},
{
"@id": "czns:subjectType",
"@type": "owl:DatatypeProperty",
"label": "主體類型",
"comment": "頁面主要描述的對象是什麼。取值:Person、Place、TouristAttraction、Event、czns:IntangibleHeritage、czns:Guide、czns:FoodItem、DefinedTermSet、Thing。",
"range": "xsd:string"
},
{
"@id": "czns:cluster",
"@type": "owl:DatatypeProperty",
"label": "跨語言簇",
"comment": "同一內容各語言版本共用的值,取母本 slug,用於把五種語言的分支認作同一對象。",
"range": "xsd:string"
},
{
"@id": "czns:charCount",
"@type": "owl:DatatypeProperty",
"label": "正文用字數",
"comment": "去標籤、去空白後的字符數,含標點與拉丁字符;不含 script、style 標籤內的嵌入數據(如事實清單的 JSON)。",
"range": "xsd:integer"
},
{
"@id": "czns:hasSourceSection",
"@type": "owl:DatatypeProperty",
"label": "設有來源節",
"comment": "該頁是否設「來源」一節。",
"range": "xsd:boolean"
},
{
"@id": "czns:claim",
"@type": "owl:DatatypeProperty",
"label": "事實斷言",
"comment": "一條可獨立核查的陳述。不使用 schema:text——那表示某作品的正文。",
"range": "xsd:string"
},
{
"@id": "czns:verifiedOn",
"@type": "owl:DatatypeProperty",
"label": "核查日期",
"comment": "該條事實最後核對通過的日期。與 schema:dateModified(頁面修改日期)不是一回事,不合並。",
"range": "xsd:date"
}
]
}
四、這份詞表不做什麼
三條,先講清楚,免得當它比實際更強。一是沒有推理承諾:subClassOf 寫的是 schema:Thing,屬聲明性質,本站不提供 reasoner,也不保證任何機器推理結論。二是沒有獨立文件端點:平台不收 .ttl 與 .json,所以不存在 czns.ttl 這樣的地址;能取的是頁面本身,以及頁內的 script。三是沒有全量覆蓋:詞表只管本站自定義的部分,其餘一律複用 schema.org,不另造同義詞。
四是沒有取值校驗:pageType、subjectType 的允許值寫在 rdfs:comment 裡,rdfs:range 只聲明為 xsd:string。也就是說,詞表說明了允許值,不等於機器會攔住別的值。要強制約束,得另加 SHACL 一類的東西,本站沒有做。
還有一處限制寫在明處:czns: 下的術語 URI 是 /ns/# 加錨點,屬哈希命名空間——一個 HTML 頁面就能承載全部術語,不需要為每個術語開一個地址。這與「不能做內容協商」是同一處短板的兩面,如實記在這裡。
那麼現在到底靠什麼把關?兩條,2026 年 10 月 24 日又重跑過:一是全站 272 頁內嵌的 JSON-LD 逐頁 JSON.parse,結果全部可解析;二是把這 272 頁的 pageType、subjectType 取值,與上面兩個允許值清單逐一比對,沒有越界值。除這兩條之外沒有自動閘門,詞條內容與事實條目靠人工複核。
五、怎麼用
數據裡寫 "subjectType": "czns:IntangibleHeritage",同時在 @context 裡聲明 "czns": {"@id": "https://chaoshanwiki.com/ns/#", "@prefix": true},展開即得術語 URI。完整的內嵌上下文對象見命名空間第六節,可直接複製。
一處要注意:subjectType 的值寫的是緊湊 IRI(如 czns:IntangibleHeritage),但它的 range 是 xsd:string,所以 JSON-LD 處理器不會把它展開成術語 URI,取出來仍是原樣的字符串。按同一張前綴表做一次字符串替換,即得 https://chaoshanwiki.com/ns/#IntangibleHeritage。之所以不聲明為 @type: @id,是因為取值裡還有 Person、Place、Thing 這類 schema.org 的裸類名——一旦按 @id 處理,它們會被 @vocab 拼成 ns/#Person 這種並不存在的術語。
類與屬性的人讀定義、取值說明與兩層類型的劃分,都在命名空間;實際用到這些字段的數據在數據集與事實清單。
首頁 › 機器可讀 › 詞表
最後修訂時間:2026年11月3日