You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by ki...@apache.org on 2024/03/28 00:04:47 UTC
(opennlp) branch opennlp-1550 updated (9b50d2b5 -> d02b4064)
This is an automated email from the ASF dual-hosted git repository.
kinow pushed a change to branch opennlp-1550
in repository https://gitbox.apache.org/repos/asf/opennlp.git
discard 9b50d2b5 OPENNLP-1550: Update CSS of the manual (used Jena, Bootstrap as reference)
new d02b4064 OPENNLP-1550: Update CSS of the manual (used Jena, Bootstrap as reference)
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (9b50d2b5)
\
N -- N -- N refs/heads/opennlp-1550 (d02b4064)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
opennlp-docs/src/docbkx/parser.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(opennlp) 01/01: OPENNLP-1550: Update CSS of the manual (used Jena, Bootstrap as reference)
Posted by ki...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kinow pushed a commit to branch opennlp-1550
in repository https://gitbox.apache.org/repos/asf/opennlp.git
commit d02b4064f69772bbeeb6c3642c2db2d0e870993c
Author: Bruno P. Kinoshita <ki...@users.noreply.github.com>
AuthorDate: Thu Mar 28 01:01:50 2024 +0100
OPENNLP-1550: Update CSS of the manual (used Jena, Bootstrap as reference)
---
opennlp-docs/src/docbkx/corpora.xml | 16 ++-
opennlp-docs/src/docbkx/css/opennlp-docs.css | 135 ++++++++++++++++++++----
opennlp-docs/src/docbkx/evaltest.xml | 2 +-
opennlp-docs/src/docbkx/images/opennlp-logo.png | Bin 0 -> 17993 bytes
opennlp-docs/src/docbkx/introduction.xml | 6 +-
opennlp-docs/src/docbkx/langdetect.xml | 14 +--
opennlp-docs/src/docbkx/opennlp.xml | 14 ++-
opennlp-docs/src/docbkx/parser.xml | 5 +-
opennlp-docs/src/main/resources/xsl/html.xsl | 2 +-
9 files changed, 149 insertions(+), 45 deletions(-)
diff --git a/opennlp-docs/src/docbkx/corpora.xml b/opennlp-docs/src/docbkx/corpora.xml
index 39977146..116dbb49 100644
--- a/opennlp-docs/src/docbkx/corpora.xml
+++ b/opennlp-docs/src/docbkx/corpora.xml
@@ -148,7 +148,7 @@ F-Measure: 0.9230575441395671]]>
Spanish and Dutch.
</para>
<para>
- The Spanish data is a collection of news wire articles made available by the Spanish EFE News Agency. The articles are
+ The Spanish data is a collection of newswire articles made available by the Spanish EFE News Agency. The articles are
from May 2000. The annotation was carried out by the <ulink url="https://www.talp.cat/">TALP Research Center</ulink> of the Technical University of Catalonia (UPC)
and the <ulink url="https://web.archive.org/web/20220516042208/http://clic.ub.edu/">Center of Language and Computation (CLiC)</ulink>of the University of Barcelona (UB), and funded by the European Commission
through the NAMIC project (IST-1999-12392).
@@ -258,7 +258,7 @@ path: .\es_ner_person.bin]]>
<section id="tools.corpora.conll.2003.getting">
<title>Getting the data</title>
<para>
- The English data is the Reuters Corpus, which is a collection of news wire articles.
+ The English data is the Reuters Corpus, which is a collection of newswire articles.
The Reuters Corpus can be obtained free of charges from the NIST for research
purposes: <ulink url="https://trec.nist.gov/data/reuters/reuters.html">https://trec.nist.gov/data/reuters/reuters.html</ulink>
</para>
@@ -539,12 +539,18 @@ path: /dev/opennlp/trunk/opennlp-tools/en-ontonotes.bin]]>
<para>
The brat annotation tool is an online environment for collaborative text annotation and
supports labeling documents with named entities. The best performance of a name finder
- can only be achieved if it was trained on documents similar to the the documents it will
+ can only be achieved if it was trained on documents similar to the documents it will
process. For that reason it is often necessary to manually label a large number of documents and
build a custom corpus. This is where brat comes in handy.
+ </para>
- <imagedata fileref="images/brat.png" width="6.5in" depth="4in" scalefit="1"/>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/brat.png" width="6.5in" depth="4in" scalefit="1"/>
+ </imageobject>
+ </mediaobject>
+ <para>
OpenNLP can directly be trained and evaluated on labeled data in the brat format.
Instructions on how to use, download and install brat can be found on the project website:
@@ -746,7 +752,7 @@ Performing 100 iterations.
2: . (552971/555858) 0.9948062274897546
...
...
-... (training and evaluationg x 10)
+... (training and evaluating x 10)
...
done
diff --git a/opennlp-docs/src/docbkx/css/opennlp-docs.css b/opennlp-docs/src/docbkx/css/opennlp-docs.css
index a0266867..7e3b46a5 100644
--- a/opennlp-docs/src/docbkx/css/opennlp-docs.css
+++ b/opennlp-docs/src/docbkx/css/opennlp-docs.css
@@ -15,58 +15,153 @@
* limitations under the License.
*/
+:root {
+ --font-family: system-ui, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
+ --font-size: 14px;
+ --code-font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+ --black-color: #333333;
+ --gray-color: #CCCCCC;
+ --red-color: #BE2043;
+ --purple-color: #832778;
+ --blue-color: #0033cc;
+}
+
body {
- margin-top: 1em;
- margin-bottom: 1em;
- margin-left: 16%;
- margin-right: 8%
+ margin: 0;
+ padding: 0;
+ border: 0;
+ background-color: white;
+}
+
+/* Main content holder. */
+div.book {
+ max-width: 1320px;
+ min-width: 320px;
+ margin: 0 auto;
+ font-family: var(--font-family);
+ padding: 1rem;
+ background-color: white;
+}
+
+div.toc > dl, div.list-of-tables > dl {
+ border: 2px solid var(--gray-color);
+ padding: 1rem;
+}
+
+a {
+ color: var(--blue-color);
+ text-decoration: none;
}
h1, h2, h3, h4, div.toc {
- color: #006699;
+ color: var(--red-color);
}
div.legalnotice {
- max-width: 450px;
+ max-width: 450px;
+}
+
+pre {
+ overflow: scroll;
+}
+
+pre i {
+ font-style: normal;
}
pre.programlisting, pre.screen, pre.literallayout {
- border: 1px dashed #006699;
- background-color: #EEE;
+ border: 1px solid #BBBBBB;
+ background-color: #EEE;
+ font-family: var(--code-font-family);
+ white-space: pre;
+ padding: 0 1rem;
}
-/*
+/*
* Java syntax highlighting with eclipse default colors
* and default font-style
*/
pre.programlisting .hl-keyword {
- color: #7F0055;
- font-weight: bold;
+ color: var(--purple-color);
+ font-weight: bold;
}
/* Seems to be broken, override red inline style of hl-string */
-pre.programlisting .hl-string, pre.programlisting b.hl-string i[style]{
- color: #2A00FF !important;
+pre.programlisting .hl-string, pre.programlisting b.hl-string i[style] {
+ color: #2A00FF !important;
}
pre.programlisting .hl-tag {
- color: #3F7F7F;
+ color: #3F7F7F;
}
pre.programlisting .hl-comment {
- color: #3F5F5F;
- font-style: italic;
+ color: #3F5F5F;
+ /* font-style: italic; */
}
pre.programlisting .hl-multiline-comment {
- color: #3F5FBF;
- font-style: italic;
+ color: #3F5FBF;
+ /* font-style: italic; */
}
pre.programlisting .hl-value {
- color: #2A00FF;
+ color: #2A00FF;
}
pre.programlisting .hl-attribute {
- color: #7F007F;
+ color: var(--purple-color);
+}
+
+table {
+ width: 100%;
+ border: 1px solid #A0A0A0;
+ border-spacing: 0;
+ caption-side: bottom;
+ border-collapse: collapse;
+}
+
+table thead {
+ border-color: inherit;
+ border-style: solid;
+ border-width: 0;
+}
+
+table tr {
+ border-color: inherit;
+ border-style: solid;
+ border-width: 0;
+}
+
+table th {
+ border-color: #A0A0A0;
+ border-style: solid;
+ border-width: 0;
+ border-left-width: 1px;
+ border-bottom-width: 1px;
+ text-align: inherit;
+ background-color: #ededee;
+ padding: 0.1rem 0.5rem;
+ font-weight: bold;
+}
+
+table tbody {
+ border-color: inherit;
+ border-style: solid;
+ border-width: 0;
+}
+
+table td {
+ border-color: #A0A0A0;
+ border-style: dotted;
+ border-width: 0;
+ border-left-width: 1px;
+ border-bottom-width: 1px;
+ vertical-align: top;
+ padding: 0.3em;
+}
+
+div.mediaobject img {
+ width: 100%;
+ height: 100%;
}
diff --git a/opennlp-docs/src/docbkx/evaltest.xml b/opennlp-docs/src/docbkx/evaltest.xml
index 2641fe84..620a136f 100644
--- a/opennlp-docs/src/docbkx/evaltest.xml
+++ b/opennlp-docs/src/docbkx/evaltest.xml
@@ -73,7 +73,7 @@ curl -u your_asf_username -T ./opennlp-data.zip "https://nightlies.apache.org/op
]]>
</screen>
More information about changing the evaluation test data on <code>nightlies.apache.org</code> can be found
- at :<ulink url="https://nightlies.apache.org/authoring.html">https://nightlies.apache.org/authoring.html
+ at: <ulink url="https://nightlies.apache.org/authoring.html">https://nightlies.apache.org/authoring.html
</ulink>
</para>
</section>
diff --git a/opennlp-docs/src/docbkx/images/opennlp-logo.png b/opennlp-docs/src/docbkx/images/opennlp-logo.png
new file mode 100644
index 00000000..6ec29792
Binary files /dev/null and b/opennlp-docs/src/docbkx/images/opennlp-logo.png differ
diff --git a/opennlp-docs/src/docbkx/introduction.xml b/opennlp-docs/src/docbkx/introduction.xml
index 883fe70a..5187039a 100644
--- a/opennlp-docs/src/docbkx/introduction.xml
+++ b/opennlp-docs/src/docbkx/introduction.xml
@@ -67,8 +67,7 @@ under the License.
<![CDATA[
try (InputStream modelIn = new FileInputStream("lang-model-name.bin")) {
SomeModel model = new SomeModel(modelIn);
-}
-]]>
+}]]>
</programlisting>
</para>
<para>
@@ -178,8 +177,7 @@ where TOOL is one of:
CheckModelUpdater trains and updates the check model in a parser model
TaggerModelReplacer replaces the tagger model in a parser model
All tools print help when invoked with help parameter
-Example: opennlp SimpleTokenizer help
-]]>
+Example: opennlp SimpleTokenizer help]]>
</screen>
</para>
<para>OpenNLP tools have similar command line structure and options. To discover tool
diff --git a/opennlp-docs/src/docbkx/langdetect.xml b/opennlp-docs/src/docbkx/langdetect.xml
index 3025d5e5..865f5f94 100644
--- a/opennlp-docs/src/docbkx/langdetect.xml
+++ b/opennlp-docs/src/docbkx/langdetect.xml
@@ -150,8 +150,8 @@ lav Egija Tri-Active procedūru īpaši iesaka izmantot siltākajos gadalaik
The following command will train the language detector and write the model to langdetect.bin:
<screen>
<![CDATA[
-$ bin/opennlp LanguageDetectorTrainer[.leipzig] -model modelFile [-params paramsFile] [-factory factoryName] -data sampleData [-encoding charsetName]
-]]>
+$ bin/opennlp LanguageDetectorTrainer[.leipzig] -model modelFile [-params paramsFile] \
+ [-factory factoryName] -data sampleData [-encoding charsetName]]]>
</screen>
Note: To customize the language detector, extend the class opennlp.tools.langdetect.LanguageDetectorFactory
add it to the classpath and pass it in the -factory argument.
@@ -176,8 +176,7 @@ $ bin/opennlp LanguageDetectorTrainer[.leipzig] -model modelFile [-params params
<![CDATA[
$ bin/opennlp LanguageDetectorTrainer.leipzig -model modelFile [-params paramsFile] [-factory factoryName] \
-sentencesDir sentencesDir -sentencesPerSample sentencesPerSample -samplesPerLanguage samplesPerLanguage \
- [-encoding charsetName]
-]]>
+ [-encoding charsetName]]]>
</screen>
</para>
@@ -191,8 +190,7 @@ $ bin/opennlp LanguageDetectorTrainer.leipzig -model modelFile [-params paramsFi
$ bin/opennlp LanguageDetectorConverter leipzig -sentencesDir leipzig-train/ -sentencesPerSample 5 -samplesPerLanguage 10000 > leipzig.txt
$ perl -MList::Util=shuffle -e 'print shuffle(<STDIN>);' < leipzig.txt > leipzig_shuf.txt
$ head -100000 < leipzig_shuf.txt > leipzig.train
-$ tail -20000 < leipzig_shuf.txt > leipzig.eval
-]]>
+$ tail -20000 < leipzig_shuf.txt > leipzig.eval]]>
</screen>
</para>
</section>
@@ -216,9 +214,7 @@ params.put(TrainingParameters.CUTOFF_PARAM, 0);
LanguageDetectorFactory factory = new LanguageDetectorFactory();
LanguageDetectorModel model = LanguageDetectorME.train(sampleStream, params, factory);
-model.serialize(new File("langdetect.bin"));
-}
-]]>
+model.serialize(new File("langdetect.bin"));]]>
</programlisting>
</para>
</section>
diff --git a/opennlp-docs/src/docbkx/opennlp.xml b/opennlp-docs/src/docbkx/opennlp.xml
index 63724956..0d2115a2 100644
--- a/opennlp-docs/src/docbkx/opennlp.xml
+++ b/opennlp-docs/src/docbkx/opennlp.xml
@@ -28,6 +28,14 @@ under the License.
<productname>OpenNLP</productname>
+ <subtitle>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="./images/opennlp-logo.png" />
+ </imageobject>
+ </inlinemediaobject>
+ </subtitle>
+
<authorgroup>
<corpauthor>Written and maintained by the Apache OpenNLP Development
Community</corpauthor>
@@ -64,10 +72,10 @@ under the License.
<copyright>
<year>2011</year>
- <year>2023</year>
+ <year>2024</year>
<holder>The Apache Software Foundation</holder>
</copyright>
-
+
<!-- pubdate><?eval ${project.properties.buildMonth}?>
, <?eval ${project.properties.buildYear}?>
</pubdate -->
@@ -92,5 +100,5 @@ under the License.
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./uima-integration.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./morfologik-addon.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./cli.xml" />
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="evaltest.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./evaltest.xml" />
</book>
diff --git a/opennlp-docs/src/docbkx/parser.xml b/opennlp-docs/src/docbkx/parser.xml
index 64cac083..673832ac 100644
--- a/opennlp-docs/src/docbkx/parser.xml
+++ b/opennlp-docs/src/docbkx/parser.xml
@@ -30,11 +30,12 @@ under the License.
<para>
A parser returns a parse tree from a sentence according to a phrase structure grammar. A parse tree specifies
the internal structure of a sentence. For example, the following image represents a parse tree for
- the sentence 'The cellphone was broken in two days':
+ the sentence 'The cellphone was broken in two days':</para>
<imagedata fileref="images/parsetree1.png" scalefit="1"/>
- A parse tree can be used to determine the role of subtrees or constituents in the sentence. For example, it is possible to
+ <para>
+ A parse tree can be used to determine the role of subtrees or constituents in the sentence. For example, it is possible to
know that 'The cellphone' is the subject of the sentence and the verb (action) is 'was broken.'
</para>
diff --git a/opennlp-docs/src/main/resources/xsl/html.xsl b/opennlp-docs/src/main/resources/xsl/html.xsl
index a9f587e8..13c1d288 100644
--- a/opennlp-docs/src/main/resources/xsl/html.xsl
+++ b/opennlp-docs/src/main/resources/xsl/html.xsl
@@ -27,7 +27,7 @@
<!-- set bellow all your custom xsl configuration -->
<xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/>
- <xsl:param name="generate.section.toc.level" select="4"></xsl:param>
+ <xsl:param name="generate.section.toc.level" select="4"/>
<xsl:param name="toc.section.depth">4</xsl:param>
</xsl:stylesheet>
\ No newline at end of file