jschnasse / oi Goto Github PK
View Code? Open in Web Editor NEWbeta: a small tool to convert between csv,json,yml,xml,rdf. It can easily be combined with existing tools like xsltproc,jq,sed,grep and awk.
License: Eclipse Public License 2.0
beta: a small tool to convert between csv,json,yml,xml,rdf. It can easily be combined with existing tools like xsltproc,jq,sed,grep and awk.
License: Eclipse Public License 2.0
Maybe add JAVA_FLAGS to startscript:
JAVA_FLAGS='-Dhttp.proxyHost="...." -Dhttp.proxyPort="...." -Dhttp.nonProxyHosts="localhost|127.0.0.1|10.*.*.*" -Djava.net.useSystemProxies=true'
if [ -f /usr/lib/libprocname.so ]
then
LD_PRELOAD=/usr/lib/libprocname.so PROCNAME=oi jvm_for_oi ${JAVA_FLAGS} -jar /usr/lib/oi.jar $@
else
jvm_for_oi ${JAVA_FLAGS} -jar /usr/lib/oi.jar $@
fi
Possible solution:
Add jdk.crypto.ec to Docker.build
Passing the xml from https://www.dimdi.de/dynamic/.downloads/klassifikationen/icd-10-gm/version2020/icd10gm2020syst-claml.zip to oi I get two errors.
First error is about MixedContent in the <Label>
elements that cannot be handled by the underlying jackson library. I worked around this issue by preprocessing the xml with cat icd10gm2020syst_claml_20190920.xml |sed -e s/"\(<Label[^>]*>\)"/"\1<\![CDATA["/g|sed -e s/"<\/Label>"/"]]><\/Label>"/g > prep.xml
Now oi
is able to read the data but the result is way to small. It turns out that the jackson library is not able to store reoccurring elements in a list.
Example:
echo "<array><item>1</item><item>2</item></array>" > prep.xml
oi prep.xml
Expected:
---
item: "1"
item: "2"
Actual:
---
item: "2"
I downloaded
https://www.dimdi.de/dynamic/.downloads/sonstige/mesh/mesh-2019-datenbankfassung.zip
and extracted the ANN.TXT file from the bundle.
Here is, what I got:
oi -i csv --header="ENR,ANN" -d ";" ANN.TXT
[|D000002|, |for use to kill or control insects, use no qualifiers on the insecticide or the insect, appropriate qualifiers may be used when other aspects of the insecticide are discussed such as the effect on a physiologic process or behavioral aspect of the insect, for poisoning, coordinate with ORGANOPHOSPHATE POISONING |] 4
[ENR, ANN] 2
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
at org.schnasse.oi.main.Main.convert(Main.java:138)
at org.schnasse.oi.main.Main.call(Main.java:82)
at org.schnasse.oi.main.Main.call(Main.java:30)
at picocli.CommandLine.executeUserObject(CommandLine.java:1743)
at picocli.CommandLine.access$900(CommandLine.java:145)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2101)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2068)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1935)
at picocli.CommandLine.execute(CommandLine.java:1864)
at org.schnasse.oi.main.Main.main(Main.java:59)
Caused by: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
at org.schnasse.oi.reader.CsvReader.getMap(CsvReader.java:48)
at org.schnasse.oi.main.Main.convert(Main.java:102)
... 9 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
at org.schnasse.oi.reader.CsvReader.getMap(CsvReader.java:40)
... 10 more
The website hosting the prebuilt package is unavailable. (502 Bad Gateway)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.