Skip to content

Instantly share code, notes, and snippets.

🌏
NLP

Yauhen yauhen-info

🌏
NLP
Block or report user

Report or block yauhen-info

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View EntryPointIllinoisTaggerTest.java
package test;
import LBJ2.nlp.SentenceSplitter;
import LBJ2.nlp.WordSplitter;
import LBJ2.nlp.seg.PlainToTokenParser;
import LBJ2.nlp.seg.Token;
import edu.illinois.cs.cogcomp.lbj.pos.POSTagger;
public class EntryPointIllinoisTaggerTest {
@yauhen-info
yauhen-info / BoundariesEditor.java
Created Feb 13, 2014
Change boundaries of found pattern
View BoundariesEditor.java
package info.yauhen;
public class BoundariesEditor {
public static void main(String[] args) {
//Substitute
String testString = "<Test> <LCOc1>";
testString = testString.replaceAll("\\(", "<").replaceAll("//", ">");
testString = testString
.replaceAll("<[A-Za-z0-9\\.\\-=]+>", "($0)")
.replaceAll(">\\)","\\)")
@yauhen-info
yauhen-info / ParagraphsDetector.java
Last active Aug 29, 2015
Heuristic to detect paragraphs in a raw text with new lines
View ParagraphsDetector.java
package info.yauhen;
public class BoundariesEditor {
public static void main(String[] args) {
//Substitute
String testString = "Sun Life Financial Inc,\n" +
"Canada's No. 3 life insurer, said on Wednesday its\n" +
"fourth-quarter profit rose 39 percent, helped by a C$290 million\n" +
"gain related to the restructuring of internal reinsurance\n" +
"arrangements. \n" +
@yauhen-info
yauhen-info / run_C_file
Last active Aug 29, 2015
Run C/C++ via command line in Linux
View run_C_file
- Open a terminal.
- Compile your source
(in case of using the GCC compiler, type):
"gcc main_file.c -o main_app"
- Run the executable via "./main_app"
@yauhen-info
yauhen-info / Get_matched_words.txt
Created May 14, 2014
Get matched words, Linux command line
View Get_matched_words.txt
The grep -o command will only display matched words and the wc -c command will display the word counts from a text file barfoo.txt:
grep -o -w 'foo' barfoo.txt | wc -w
@yauhen-info
yauhen-info / GetTop.java
Created Jun 11, 2014
Top N Strings by quantity from input list of strings
View GetTop.java
import java.util.*;
public class GetTop{
public static void main(String[] args){
List<String> input = new ArrayList<>();
input.add("one");
input.add("two");
input.add("two");
input.add("three");
@yauhen-info
yauhen-info / Links.txt
Last active Jul 8, 2019
Maven, Jersey, Tomcat Embedded sample
View Links.txt
@yauhen-info
yauhen-info / tensorflow_install.md
Last active Feb 12, 2018
To install an older version of Tensorflow on Ubuntu
View tensorflow_install.md

OS: Ubuntu 14.04.5 LTS, Anaconda env

The issue was faced while found that code cannot be run due to import errors caused by tensorflow, so

Suggested solution on stackoveflow page, in details here

e.g for tensorflow version - 0.11, python - 3.5

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp35-cp35m-linux_x86_64.whl
pip install --ignore-installed --upgrade $TF_BINARY_URL
View java_and_osx.txt
Check the installed versions:
> /usr/libexec/java_home -V
@yauhen-info
yauhen-info / jdk_switch_macos.txt
Last active Sep 23, 2018
JDK version switch on MacOS
View jdk_switch_macos.txt
1. Check the current version out of curiosity
> /usr/libexec/java_home -V
Expected result should be similar to
Matching Java Virtual Machines (2):
9.0.4, x86_64: "Java SE 9.0.4" /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
1.8.0_162, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home
You can’t perform that action at this time.