This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "AlchemyAPI.rb" | |
alchemyObj = AlchemyAPI.new(); | |
alchemyObj.setAPIKey("########"); | |
# Categorize some text. | |
result = alchemyObj.TextGetCategory("Latest on the War in Iraq."); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@TypeCapability(inputs = { TypeSystem.TOKEN }, outputs = { TypeSystem.BIO_ENTITY_MENTION }) | |
public class JythonAE extends JCasAnnotator_ImplBase { | |
public static final String SCRIPT_PATH = "script_path"; | |
@ConfigurationParameter(name = SCRIPT_PATH) | |
private String scriptPath; | |
private PythonInterpreter interp; | |
private String scriptFile; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python imports. for now, only Python std library is possible | |
import re | |
# importing Java packages | |
# see http://wiki.python.org/jython/UserGuide#accessing-java-from-jython | |
from org.apache.uima.jcas.tcas import Annotation | |
# jcas object is made available to this script. use it like any python object. | |
text = jcas.getDocumentText(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# onlineldavb.py: Package of functions for fitting Latent Dirichlet | |
# Allocation (LDA) with online variational Bayes (VB). | |
# | |
# Copyright (C) 2010 Matthew D. Hoffman | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @(#)PowerLaw.java ver 1.2 6/20/2005 | |
* | |
* Modified by Weishuai Yang ([email protected]). | |
* | |
* this file is based on T J Finney's Manuscripts Simulation Tool, 2001 | |
*/ | |
import java.util.Random; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.util.Collection; | |
import java.util.Map; | |
import com.wcohen.ss.abbvGapsHmm.Acronym; | |
import com.wcohen.ss.abbvGapsHmm.AlignmentPredictionModel; | |
public class AbreviationsTest { | |
public static void main(String[] args) throws IOException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.Reader; | |
import java.io.StringReader; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.apache.lucene.analysis.Analyzer; | |
import org.apache.lucene.analysis.LowerCaseFilter; | |
import org.apache.lucene.analysis.StopFilter; | |
import org.apache.lucene.analysis.StopwordAnalyzerBase; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>ch.epfl.bbp.nlp</groupId> | |
<artifactId>blue_uima_parent</artifactId> | |
<version>0.1.0-SNAPSHOT</version> | |
<name></name> | |
<description></description> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hellllo</title> | |
<style type="text/css"> | |
html, body { | |
background-color:#000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ch.epfl.bbp.nlp.obo; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Map; | |
import java.util.Set; |
OlderNewer