How to convert sourcecode to HTML, RTF, SVG, etc.

I am working on my paper which needs a piece of XML to syntax highlighted. I’ve found Sublime with “Copy as RTF” plugins is useful, but as a programmer I prefer something that being done via commend line, and more importantly being easily customizable. So I did a some searches and came across highlight. To install it on Ubuntu is quite simple sudo apt-get install highlight Then I can use highlight to convert the XML file to RTF and copy it to the paper I am working on. read more

A Java implementation of data structures and code to read/write Brat standoff format.

A Java implementation of data structures and code to read/write Brat standoff format. Brat (from brat standoff format) Annotations created in brat are stored on disk in a standoff format: annotations are stored separately from the annotated document text, which is never modified by the tool. For each text document in the system, there is a corresponding annotation file. The two are associated by the file naming convention that their base name (file name without suffix) is the same: for example, the file DOC-1000.ann contains annotations for the file DOC-1000.txt. Within the document, individual annotations are connected to specific spans of text through character offsets. For example, in a… Read More »

My Java solution for Leetcode Online Judge

My Java solution for Leetcode Online Judge: All the codes are tested using online-judge. Please feel free to let me know if you have any problem or better solutions. Requirements Java version >= 1.6 Maven2 Unit tests Almost all problems are accompanied by test cases. Some have corner test cases, others do not. mvn test

Another Java implementation of BioC

Data structures and code to read/write BioC XML. [ BioC BioC XML format can be used to share text documents and annotations. The development of Java BioC IO API is independent of the particular XML parser used. read more

Java data structure to use C implementation of word2vec

Data structure to use C implementation of word2vec. Getting started com.pengyifan.word2vec pengyifan-word2vec 0.0.1 ` or oss-sonatype oss-sonatype true … com.pengyifan.word2vec pengyifan-word2vec 0.0.1-SNAPSHOT Webpage The official word2vec webpage is available with all up-to-date instructions and code.

Resolve coreference using Stanford CoreNLP

Coreference resolution is the task of finding all expressions that refer to the same entity in a text. Stanford CoreNLP coreference resolution system is the state-of-the-art system to resolve coreference in the text. To use the system, we usually create a pipeline, which requires tokenization, sentence splitting, part-of-speech tagging, lemmarization, named entity recoginition, and parsing. However sometimes, we use others tools for preprocessing, particulaly when we are working on a specific domain. In these cases, we need a stand-alone coreference resolution system. This post demenstrates how to create such a system using Stanford CoreNLP. Load properties In general, we can just create an empty Properties, because the Stanford CoreNLP tool… Read More »

How to access file resources in JUnit tests

In maven, any file under src/test/resources is copied to target/test-classes. How to access these resource files in JUnit? Using the class’s resource. It will locate the file in the test’s classpath /target/test-classes. URL url = this.getClass().getResource(“/” + TEST_FILENAME); File file = new File(url.getFile());

Referee’ quotes published by Environmental Microbiology

I recently read a series of referee’ quotes published by Environmental Microbiology. As stated in every article, the referees are busy, serious individuals who give selflesslyof their precious time to improve manuscript. But, once in a while, their humour (or admiration) gets the better of them. Here are some quotes that I like most. 2007 I recommend the authors to get in contact with, e.g. sanitary engineers or fermentation/process engineersand not to try and invent the wheel again. I only am willing to read this again if it has less than 20pages (Ed.: the original submission had 54)! read more