You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/getting-started/uima-duui.md
+123-4Lines changed: 123 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,16 +15,135 @@ graph LR
15
15
16
16
## UIMA
17
17
18
-
To be added.
18
+
UIMA (Unstructured Information Management Architecture), is a framework designed to process and analyze large volumes of unstructured data, such as text, audio, images, and video. It provides a standardized and flexible platform to integrate various analysis components, making it easier to build complex systems for tasks like natural language processing (NLP), information extraction, and machine learning.
19
19
20
20
## DUUI
21
21
22
-
To be added.
22
+
DUUI (Docker Unified UIMA Interface) is a platform designed to efficiently process large media corpora (mainly text, but offers also support for other media types such as video, images, and audio). It builds on the UIMA framework, using it to manage annotations, and leverages container technologies to integrate a variety of NLP tools. DUUI supports both horizontal scaling (distributing processing across multiple machines) and vertical scaling (optimizing resource use on a single machine), making it highly scalable for handling big data. It accommodates diverse NLP tools and programming languages, abstracting their differences through a unified interface, and ensures reproducibility by tracking processing pipelines. Additionally, DUUI provides robust monitoring and error-reporting features to manage large-scale tasks and is designed for ease of use, making advanced NLP accessible to users with varying technical expertise, including non-experts in research fields like digital humanities, biodiversity etc.
23
23
24
24
## Tut 1
25
25
26
-
To be added.
26
+
This example demonstrates a simple annotation process: (1) creating a UIMA document, (2) setting its text, (3) splitting the text at the whitespace level, and then (4) adding token annotations to the UIMA document.
27
27
28
+
```java
29
+
importorg.apache.uima.UIMAException;
30
+
importorg.apache.uima.jcas.JCas;
31
+
importorg.apache.uima.jcas.JCasFactory;
32
+
importorg.apache.uima.jcas.tcas.Annotation;
33
+
importorg.apache.uima.cas.FSIterator;
34
+
35
+
publicclassJCasExample {
36
+
publicstaticvoidmain(String[] args) {
37
+
try {
38
+
// Step 1: Create the JCas object
39
+
JCas jc =JCasFactory.createJCas();
40
+
41
+
// Step 2: Set the sofa string (document text)
42
+
String text ="This is a sample text: I like DUUI and UCE";
43
+
jc.setDocumentText(text);
44
+
45
+
// Step 3: Add token annotations by splitting on whitespace
46
+
String[] tokens = text.split("\\s+"); // Split by one or more whitespace characters
47
+
int currentPosition =0;
48
+
49
+
for (String token : tokens) {
50
+
// Find the starting position of the current token in the original text
51
+
int begin = text.indexOf(token, currentPosition);
52
+
int end = begin + token.length();
53
+
54
+
// Step 4: Create an annotation for the token and add the annotation to the JCas
This example demonstrates the initialization and execution of a DUUI pipeline for processing a corpus. It includes a simple language detection component to annotate the language of the documents. The example covers the following steps: (1) Define the input and output corpus paths, (2) Declare a pipeline reader, (3) Initialize a Lua context, (4) Initialize the composer, (5) Initialize drivers and add them to the pipeline, (6) Initialize components and add them to the pipeline, (7) Add a writer to the pipeline, (8) Run the pipeline.
0 commit comments