Apache Any23 常用 CLI 命令与工具详解

Apache Any23 2.7 命令行工具完全手册:全局选项与 extractor/rover/microdata/mimes/verify/vocab 六个子命令的用法参数与真实回显,含格式切换、提取统计与插件验证,适合日常运维调试。

Apache Any23Any232026/10/14

Apache Any23 常用 CLI 命令与工具详解

目标:全面掌握 Apache Any23 2.7 CLI(bin/any23)的六个子命令——extractor、rover、microdata、mimes、verify、vocab,覆盖命令格式、关键参数、真实回显与常见报错,作为日常抽取、调试与插件管理的手册。

一、环境信息

项目值
操作系统Ubuntu 22.04.5 LTS(实测主环境,辅以 CentOS 8.4 对照)
Any23 版本Apache Any23 2.7(最终正式发布版)
Java 版本OpenJDK 11.0.32.1(Ubuntu)/ 11.0.13(CentOS)
安装目录/opt/any23-2.7(Ubuntu)/ /opt/any23(CentOS)
样例文件/opt/any23-demo/sample.html
执行账号root

二、版本与生命周期说明

  1. Apache Any23 于 2023 年 7 月进入 Apache Attic,项目停止维护(EOL),本文命令基于 2.7 最终正式版实测。
  2. 2.8 仅停留在 SNAPSHOT 阶段从未发布正式版本,CLI 行为以 2.7 为准。

💡 技术拓展:Any23 已停止维护,若项目仍需要"从 HTML/文档抽取结构化元数据"的能力,社区建议评估 Apache Tika(tika.apache.org),其提供更完整的文档解析、元数据提取与 REST 服务,维护活跃。

三、命令总览

执行 any23 --help 查看全局选项与全部子命令:

any23 --help
Usage: any23 [options] [command] [command options]
  Options:
    -h, --help
      Display help information.
      Default: false
    --plugins-dir
      The Any23 plugins directory.
      Default: /root/.any23/plugins
    -X, --verbose
      Produce execution verbose output.
      Default: false
    -v, --version
      Display version information.
      Default: false
  Commands:
    extractor      Utility for obtaining documentation about metadata
            extractors.
      Usage: extractor [options]
        Options:
          -a, --all
            shows a report about all available extractors
            Default: false
          -i, --input
            shows example input for the given extractor
          -l, --list
            shows the names, labels and supported mimetypes of all available
            extractors
            Default: false
          -o, --output
            shows example output for the given extractor

    microdata      Commandline Tool for extracting Microdata from file/HTTP
            source.
      Usage: microdata Input document URL,
            {http://path/to/resource.html|file:/path/to/localFile.html}

    mimes      MIME Type Detector Tool.
      Usage: mimes Input document URL,
            {http://path/to/resource.html|file:///path/to/local.file|inline://
            some inline content}

    verify      Utility for plugin management verification.
      Usage: verify plugins-dir

    rover      Apache Any23 Command Line Tool.
      Usage: rover [options] input IRIs {<url>|<file>}+
        Options:
          -d, --defaultns
            Override the default namespace used to produce statements.
          -e, --extractors
            a comma-separated list of extractors, e.g. rdf-xml,rdf-turtle,
            etc. A complete extractor list can be obtained by calling ./any23
            extractor --list
            Default: [csv, html-embedded-jsonld, html-head-icbm, html-head-links, html-head-meta, html-head-title, html-mf-adr, html-mf-geo, html-mf-hcalendar, html-mf-hcard, html-mf-hlisting, html-mf-hrecipe, html-mf-hresume, html-mf-hreview, html-mf-hreview-aggregate, html-mf-license, html-mf-species, html-mf-xfn, html-microdata, html-rdfa11, html-xpath, ical, jcal, owl-functional, owl-manchester, rdf-jsonld, rdf-nq, rdf-nt, rdf-trix, rdf-turtle, rdf-xml, xcal, yaml]
          -f, --format
            a comma-separated list of writer factories, e.g.
            json,jsonld,nquads,notrivial,ntriples,trix,turtle,uri
            Default: [ntriples]
          -l, --log
            Produce log within a file.
          -n, --nesting
            Disable production of nesting triples.
            Default: false
          -t, --notrivial
            Filter trivial statements (e.g. CSS related ones). [DEPRECATED: As
            of version 2.3, use --format instead.]
            Default: false
          -o, --output
            Specify Output file (defaults to standard output)
          -p, --pedantic
            Validate and fixes HTML content detecting commons issues.
            Default: false
          -s, --stats
            Print out extraction statistics.
            Default: false

    vocab      Prints out the RDF Schema of the vocabularies used by Any23.
      Usage: vocab [options]
        Options:
          -f, --format
            Vocabulary output format
            Default: N-Quads (mimeTypes=application/n-quads, text/x-nquads, text/nq, text/nquads; ext=nq)

命令清单:

子命令用途常用参数
extractor提取器文档与调试-l 列表、-a 全部报告、-i 示例输入、-o 示例输出
rover核心 RDF 抽取工具-e 提取器、-f 格式、-o 输出文件、-s 统计、-p 修复
microdata单独提取 Microdata输入 URL 或 file: 路径
mimesMIME 类型检测http/file/inline 三类输入
verify插件目录校验插件目录路径
vocab输出全部词汇表 Schema-f 输出格式

验证结果:6 个子命令全部注册可用,rover 与 extractor 为最高频命令。

四、extractor:提取器文档工具

4.1 列出全部提取器

any23 extractor -l
------------------------------------------------------------------------
Apache Any23 :: extractor
------------------------------------------------------------------------

                      csv [org.apache.any23.extractor.csv.CSVExtractorFactory] [text/csv;q=0.1]
     html-embedded-jsonld [org.apache.any23.extractor.html.EmbeddedJSONLDExtractorFactory] [text/html;q=0.02, application/xhtml+xml;q=0.02]
           html-head-icbm [org.apache.any23.extractor.html.ICBMExtractorFactory] [text/html;q=0.01, application/xhtml+xml;q=0.01]
          html-head-links [org.apache.any23.extractor.html.HeadLinkExtractorFactory] [text/html;q=0.05, application/xhtml+xml;q=0.05]
           html-head-meta [org.apache.any23.extractor.html.HTMLMetaExtractorFactory] [text/html;q=0.02, application/xhtml+xml;q=0.02]
          html-head-title [org.apache.any23.extractor.html.TitleExtractorFactory] [text/html;q=0.02, application/xhtml+xml;q=0.02]
              html-mf-adr [org.apache.any23.extractor.html.AdrExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
              html-mf-geo [org.apache.any23.extractor.html.GeoExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
        html-mf-hcalendar [org.apache.any23.extractor.html.HCalendarExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
            html-mf-hcard [org.apache.any23.extractor.html.HCardExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
         html-mf-hlisting [org.apache.any23.extractor.html.HListingExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
          html-mf-hrecipe [org.apache.any23.extractor.html.HRecipeExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
          html-mf-hresume [org.apache.any23.extractor.html.HResumeExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
          html-mf-hreview [org.apache.any23.extractor.html.HReviewExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
html-mf-hreview-aggregate [org.apache.any23.extractor.html.HReviewAggregateExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
          html-mf-license [org.apache.any23.extractor.html.LicenseExtractorFactory] [text/html;q=0.01, application/xhtml+xml;q=0.01]
          html-mf-species [org.apache.any23.extractor.html.SpeciesExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
              html-mf-xfn [org.apache.any23.extractor.html.XFNExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
           html-microdata [org.apache.any23.extractor.microdata.MicrodataExtractorFactory] [text/html;q=0.1, application/xhtml+xml;q=0.1]
              html-rdfa11 [org.apache.any23.extractor.rdfa.RDFa11ExtractorFactory] [application/xhtml+xml;q=0.3, application/html;q=0.3, text/html;q=0.3]
               html-xpath [org.apache.any23.extractor.xpath.XPathExtractorFactory] [text/html;q=0.02, application/xhtml+xml;q=0.02]
                     ical [org.apache.any23.extractor.calendar.ICalExtractorFactory] [text/calendar]
                     jcal [org.apache.any23.extractor.calendar.JCalExtractorFactory] [application/calendar+json]
           owl-functional [org.apache.any23.extractor.rdf.FunctionalSyntaxExtractorFactory] [text/owl-functional]
           owl-manchester [org.apache.any23.extractor.rdf.ManchesterSyntaxExtractorFactory] [text/owl-manchester]
               rdf-jsonld [org.apache.any23.extractor.rdf.JSONLDExtractorFactory] [application/ld+json;q=0.1]
                   rdf-nq [org.apache.any23.extractor.rdf.NQuadsExtractorFactory] [application/n-quads, text/x-nquads;q=0.1, text/rdf+nq;q=0.1, text/nq;q=0.1, text/nquads;q=0.1, text/n-quads;q=0.1]
                   rdf-nt [org.apache.any23.extractor.rdf.NTriplesExtractorFactory] [application/n-triples;q=0.1, text/nt;q=0.1, text/ntriples;q=0.1, text/plain;q=0.1]
                 rdf-trix [org.apache.any23.extractor.rdf.TriXExtractorFactory] [application/trix]
               rdf-turtle [org.apache.any23.extractor.rdf.TurtleExtractorFactory] [text/turtle, text/rdf+n3, text/n3, application/n3, application/x-turtle, application/turtle]
                  rdf-xml [org.apache.any23.extractor.rdf.RDFXMLExtractorFactory] [application/rdf+xml, text/rdf, text/rdf+xml, application/rdf]
                     xcal [org.apache.any23.extractor.calendar.XCalExtractorFactory] [application/calendar+xml]
                     yaml [org.apache.any23.extractor.yaml.YAMLExtractorFactory] [text/x-yaml;q=0.5]

------------------------------------------------------------------------
Apache Any23 SUCCESS
Total time: 0s
Finished at: Tue Oct 13 16:21:10 GMT 2026
Final Memory: 47M/506M
------------------------------------------------------------------------

验证结果:共 33 个提取器,每行格式为 名称 [工厂类] [支持的 MIME 类型与 q 值]。

4.2 查看指定提取器示例输入输出

any23 extractor -i html-rdfa11
------------------------------------------------------------------------
Apache Any23 :: extractor
------------------------------------------------------------------------

<div xmlns:v="http://schema.org/" typeof="v:Review">
    <span property="v:itemreviewed">L?Amourita Pizza</span>
    Reviewed by
    <span property="v:author">Ulysses Grant</span> on
    <span property="v:dateCreated" content="2009-01-06">Jan 6</span>.
    <span property="v:summary">Delicious, tasty pizza on Eastlake!</span>
   <span property="v:about">L'Amourita serves up traditional wood-fired
   Neapolitan-style pizza, brought to your table promptly and without fuss.
   An ideal neighborhood pizza joint.</span>
    Rating:
    <span property="v:reviewRating">4.5</span>
</div>

------------------------------------------------------------------------
Apache Any23 SUCCESS
Total time: 0s
Finished at: Tue Oct 13 16:35:52 GMT 2026
Final Memory: 47M/506M
------------------------------------------------------------------------
any23 extractor -o html-rdfa11
------------------------------------------------------------------------
Apache Any23 :: extractor
------------------------------------------------------------------------


_:n0 a <http://schema.org/Review>;
  <http://schema.org/itemreviewed> "L?Amourita Pizza";
  <http://schema.org/author> "Ulysses Grant";
  <http://schema.org/dateCreated> "2009-01-06";
  <http://schema.org/summary> "Delicious, tasty pizza on Eastlake!";
  <http://schema.org/about> "L'Amourita serves up traditional wood-fired Neapolitan-style pizza, brought to your table promptly and without fuss. An ideal neighborhood pizza joint.";
  <http://schema.org/reviewRating> "4.5" .


------------------------------------------------------------------------
Apache Any23 SUCCESS
Total time: 0s
------------------------------------------------------------------------

4.3 查看提取器完整报告

any23 extractor -a
------------------------------------------------------------------------
Apache Any23 :: extractor
------------------------------------------------------------------------

Extractor: csv
        type: ContentExtractor

-------- Example Input  --------
Year,Make,Model,Length
1997,Ford,E350,2.34
2000,Mercury,Cougar,2.38
-------- Example Output --------

<http://example.com/Year> <http://www.w3.org/2000/01/rdf-schema#label> "Year";
  <http://tools.ietf.org/html/rfc4180columnPosition> 0 .

<http://example.com/Make> <http://www.w3.org/2000/01/rdf-schema#label> "Make";
  <http://tools.ietf.org/html/rfc4180columnPosition> 1 .

<http://example.com/Model> <http://www.w3.org/2000/01/rdf-schema#label> "Model";
  <http://tools.ietf.org/html/rfc4180columnPosition> 2 .

<http://example.com/Length> <http://www.w3.org/2000/01/rdf-schema#label> "Length";
  <http://tools.ietf.org/html/rfc4180columnPosition> 3 .

<http://example.com/row/0> a <http://tools.ietf.org/html/rfc4180Row>;
  <http://example.com/Year> 1997;
  <http://example.com/Make> "Ford";
  <http://example.com/Model> "E350";

验证结果:-a 逐个输出每个提取器的类型、示例输入与示例输出,报告很长(33 个提取器),可用管道配合 grep 定向查看。

五、rover:核心抽取工具

5.1 基本抽取

any23 rover /opt/any23-demo/sample.html
------------------------------------------------------------------------
Apache Any23 :: rover
------------------------------------------------------------------------

<file:/opt/any23-demo/sample.html> <http://vocab.sindice.net/any23#author> "Apache Any23 Team"@zh-CN .
<file:/opt/any23-demo/sample.html> <http://vocab.sindice.net/any23#keywords> "RDF, metadata, extraction"@zh-CN .
<file:/opt/any23-demo/sample.html> <http://purl.org/dc/terms/title> "Any23 实测示例页面" .
_:node1k4r135pex2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
_:node1k4r135pex2 <http://schema.org/name> "Alice"@zh-CN .
<file:/opt/any23-demo/sample.html> <http://www.w3.org/1999/xhtml/microdata#item> _:node1k4r135pex2 .
<file:/opt/any23-demo/sample.html> <http://www.w3.org/1999/xhtml/vocab#license> <http://www.apache.org/licenses/LICENSE-2.0> .
<file:/opt/any23-demo/sample.html> <http://www.w3.org/ns/rdfa#usesVocabulary> <http://schema.org/> .
_:n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Book> .
_:n0 <http://schema.org/name> "Anything To Triples"@zh-CN .
_:n0 <http://schema.org/author> "Apache Any23"@zh-CN .

------------------------------------------------------------------------
Apache Any23 SUCCESS
Total time: 127s
Finished at: Tue Oct 13 16:23:32 GMT 2026
Final Memory: 79M/506M
------------------------------------------------------------------------

5.2 指定提取器与输出文件

any23 rover -e html-head-title,html-rdfa11,html-microdata -f nquads -o /opt/any23-demo/out.nq /opt/any23-demo/sample.html
cat /opt/any23-demo/out.nq
<file:/opt/any23-demo/sample.html> <http://www.w3.org/1999/xhtml/vocab#license> <http://www.apache.org/licenses/LICENSE-2.0> <file:/opt/any23-demo/sample.html> .
<file:/opt/any23-demo/sample.html> <http://www.w3.org/ns/rdfa#usesVocabulary> <http://schema.org/> <file:/opt/any23-demo/sample.html> .
_:n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Book> <file:/opt/any23-demo/sample.html> .
_:n0 <http://schema.org/name> "Anything To Triples"@zh-CN <file:/opt/any23-demo/sample.html> .
_:n0 <http://schema.org/author> "Apache Any23"@zh-CN <file:/opt/any23-demo/sample.html> .

5.3 输出统计报告

any23 rover -e html-head-title,html-rdfa11,html-microdata -s /opt/any23-demo/sample.html
------------------------------------------------------------------------
Apache Any23 :: rover
------------------------------------------------------------------------

<file:/opt/any23-demo/sample.html> <http://purl.org/dc/terms/title> "Any23 实测示例页面" .
<file:/opt/any23-demo/sample.html> <http://www.w3.org/1999/xhtml/vocab#license> <http://www.apache.org/licenses/LICENSE-2.0> .
<file:/opt/any23-demo/sample.html> <http://www.w3.org/ns/rdfa#usesVocabulary> <http://schema.org/> .
_:n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Book> .
_:n0 <http://schema.org/name> "Anything To Triples"@zh-CN .
_:n0 <http://schema.org/author> "Apache Any23"@zh-CN .
_:node1k4r1crrmx2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
_:node1k4r1crrmx2 <http://schema.org/name> "Alice"@zh-CN .
<file:/opt/any23-demo/sample.html> <http://www.w3.org/1999/xhtml/microdata#item> _:node1k4r1crrmx2 .

>Summary:
   -total calls: 3
   -total triples: 9
   -total runtime: 33 ms!
   -tripls/ms: 0
   -ms/calls: 11
>Extractor: html-microdata
   -total calls: 1
   -total triples: 3
   -total runtime: 13 ms!
   -tripls/ms: 0
   -ms/calls: 13
>Extractor: html-rdfa11
   -total calls: 1
   -total triples: 5
   -total runtime: 13 ms!
   -tripls/ms: 0
   -ms/calls: 13
>Extractor: html-head-title
   -total calls: 1
   -total triples: 1
   -total runtime: 2 ms!
   -tripls/ms: 0
   -ms/calls: 2

------------------------------------------------------------------------
Apache Any23 SUCCESS
Total time: 1s
Finished at: Tue Oct 13 16:29:05 GMT 2026
Final Memory: 62M/506M
------------------------------------------------------------------------

验证结果:-s 输出总调用数、总三元组数与各提取器细分耗时,指定提取器后总耗时仅 33 毫秒,确认性能瓶颈只在默认集合中的 html-embedded-jsonld。

5.4 其他常用开关

开关命令示例效果
-p 修复 HTMLany23 rover -p file.html校验并修复常见 HTML 结构问题后再抽取
-n 关闭嵌套any23 rover -n file.html不生成微格式嵌套三元组
-d 覆盖命名空间any23 rover -d http://example.org/ns file.html覆盖默认命名空间
-l 落日志any23 rover -l run.log file.html抽取过程写入日志文件

六、microdata:Microdata 专用工具

对输入文档单独应用 Microdata 提取器,输出符合 W3C Microdata JSON 规范的结构:

any23 microdata file:///opt/any23-demo/sample.html
------------------------------------------------------------------------
Apache Any23 :: microdata
------------------------------------------------------------------------

{ "result" : [{ "xpath" : "/HTML[1]/BODY[1]/DIV[2]", "id" : null, "refs" : [], "type" : "http://schema.org/Person", "itemid" : null, "properties" : [ { "xpath" : "/HTML[1]/BODY[1]/DIV[2]/SPAN[1]", "name" : "name", "value" : { "content" : "Alice", "type" : "Plain" } } ] }] }
------------------------------------------------------------------------
Apache Any23 SUCCESS
Total time: 0s
Finished at: Tue Oct 13 16:35:56 GMT 2026
Final Memory: 61M/506M
------------------------------------------------------------------------

验证结果:输出 JSON 含 xpath 定位、itemtype、属性名与值类型,可直接用于页面结构分析。

七、mimes:MIME 类型检测工具

支持 http://、file://、inline:// 三类输入:

any23 mimes file:///opt/any23-demo/sample.html
------------------------------------------------------------------------
Apache Any23 :: mimes
------------------------------------------------------------------------

text/html

------------------------------------------------------------------------
Apache Any23 SUCCESS
Total time: 0s
Finished at: Tue Oct 13 16:46:48 GMT 2026
Final Memory: 101M/506M
------------------------------------------------------------------------
any23 mimes 'inline://<http://s> <http://p> <http://o> .'
------------------------------------------------------------------------
Apache Any23 :: mimes
------------------------------------------------------------------------

text/n3

------------------------------------------------------------------------
Apache Any23 SUCCESS
Total time: 0s
------------------------------------------------------------------------

验证结果:内联 RDF 语句被识别为 text/n3,本地 HTML 识别为 text/html,检测逻辑与提取器 MIME 匹配共用同一引擎。

八、verify:插件验证工具

指向不存在的目录时失败并明确报错:

any23 verify /tmp/empty-plugins
------------------------------------------------------------------------
Apache Any23 :: verify
------------------------------------------------------------------------


------------------------------------------------------------------------
Apache Any23 FAILURE

Execution terminated with errors: <plugins-dir> must be a valid dir.

Total time: 0s
Finished at: Tue Oct 13 16:46:40 GMT 2026
Final Memory: 48M/506M
------------------------------------------------------------------------

指向有效目录(即使为空)时通过,并列出 classpath 中注册的全部插件:

mkdir -p /opt/any23-demo/plugins && any23 verify /opt/any23-demo/plugins
------------------------------------------------------------------------
Apache Any23 :: verify
------------------------------------------------------------------------

Plugin author    : <unknown>
Plugin factory   : class org.apache.any23.extractor.csv.CSVExtractorFactory
Plugin mime-types: text/csv;q=0.1
------------------------------------------------------------------------
Plugin author    : <unknown>
Plugin factory   : class org.apache.any23.extractor.html.AdrExtractorFactory
Plugin mime-types: text/html;q=0.1 application/xhtml+xml;q=0.1
------------------------------------------------------------------------
Plugin author    : <unknown>
Plugin factory   : class org.apache.any23.extractor.html.EmbeddedJSONLDExtractorFactory
Plugin mime-types: text/html;q=0.02 application/xhtml+xml;q=0.02
------------------------------------------------------------------------
Plugin author    : <unknown>
Plugin factory   : class org.apache.any23.extractor.html.GeoExtractorFactory
Plugin mime-types: text/html;q=0.1 application/xhtml+xml;q=0.1

验证结果:verify 用于检查插件目录有效性并枚举 classpath 中的插件工厂;目录参数必须真实存在,否则以 FAILURE 结束。

九、vocab:词汇表输出工具

输出 Any23 内部声明的全部词汇表 RDF Schema(默认 N-Quads 格式,支持 -f 切换):

any23 vocab | head -30
------------------------------------------------------------------------
Apache Any23 :: vocab
------------------------------------------------------------------------

<http://tools.ietf.org/html/rfc4180numberOfColumns> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180numberOfColumns> <http://www.w3.org/2000/01/rdf-schema#member> <http://tools.ietf.org/html/rfc4180> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180columnPosition> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180columnPosition> <http://www.w3.org/2000/01/rdf-schema#member> <http://tools.ietf.org/html/rfc4180> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180row> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180row> <http://www.w3.org/2000/01/rdf-schema#member> <http://tools.ietf.org/html/rfc4180> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180numberOfRows> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180numberOfRows> <http://www.w3.org/2000/01/rdf-schema#member> <http://tools.ietf.org/html/rfc4180> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180Row> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180Row> <http://www.w3.org/2000/01/rdf-schema#member> <http://tools.ietf.org/html/rfc4180> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180rowPosition> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://tools.ietf.org/html/rfc4180> .
<http://tools.ietf.org/html/rfc4180rowPosition> <http://www.w3.org/2000/01/rdf-schema#member> <http://tools.ietf.org/html/rfc4180> <http://tools.ietf.org/html/rfc4180> .
<http://purl.org/dc/terms/date> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://purl.org/dc/terms/> .
<http://purl.org/dc/terms/date> <http://www.w3.org/2000/01/rdf-schema#member> <http://purl.org/dc/terms/> <http://purl.org/dc/terms/> .
<http://purl.org/dc/terms/license> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://purl.org/dc/terms/> .
<http://purl.org/dc/terms/license> <http://www.w3.org/2000/01/rdf-schema#member> <http://purl.org/dc/terms/> <http://purl.org/dc/terms/> .
<http://purl.org/dc/terms/creator> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://purl.org/dc/terms/> .
<http://purl.org/dc/terms/creator> <http://www.w3.org/2000/01/rdf-schema#member> <http://purl.org/dc/terms/> <http://purl.org/dc/terms/> .
<http://ramonantonio.net/doac/0.1/#OrganisationalSkill> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> <http://ramonantonio.net/doac/0.1/#> .

验证结果:词汇表覆盖 rfc4180(CSV)、dcterms(都柏林核心)、doac 等,输出即 N-Quads 格式 RDF Schema。

十、全局选项与常见报错

10.1 版本信息

any23 -v
Apache Any23 2.7 (2022-02-21 18:31:44+0000)
Java version: 11.0.32.1, vendor: Ubuntu
Java home: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "Linux", version: "6.8.0-138-generic", arch: "amd64", family: "unix"

10.2 常见报错与处理

报错信息原因处理
which: command not foundCentOS 8 最小化环境缺 which,启动脚本依赖dnf install -y which
JAVA_HOME is not defined correctly脚本找不到 JDK 根目录配置 /etc/profile.d/any23.sh 的 JAVA_HOME
Expected a command, got version使用了不存在的子命令(如 any23 version)使用 any23 -v 查看版本
No such file: [/-h]rover 把 -h 当作输入文件解析rover 无独立帮助,看全局 any23 --help
<plugins-dir> must be a valid dirverify 目录参数无效先 mkdir 再 verify
默认运行约 127 秒html-embedded-jsonld 解析远程 JSON-LD 上下文超时用 -e 指定提取器集合

十一、参考链接