Skip to content

Instantly share code, notes, and snippets.

View bahrunnur's full-sized avatar

Bahrunnur bahrunnur

View GitHub Profile
# coding=UTF-8
import nltk
from nltk.corpus import brown
# This is a fast and simple noun phrase extractor (based on NLTK)
# Feel free to use it, just keep a link back to this post
# http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/
# Create by Shlomi Babluki
# May, 2013
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE
@bahrunnur
bahrunnur / Wheel.java
Last active December 18, 2015 20:29
My College Assignment, design new Abstract Data Type, implemented on java and python
public class Wheel {
private int capacity;
private int[] datas;
private int end;
Wheel(int capacity) {
this.capacity = capacity;
this.datas = new int[capacity];
this.end = 0;
import math
def sieve(to):
to += 1
primes = [1 for x in range(to)]
for i in range(2, int(math.sqrt(to))):
if primes[i]:
j = i
while j * i < to:
primes[i*j] = False
@bahrunnur
bahrunnur / LinkedListPointer.java
Created October 21, 2012 14:10
Linked List implementation with Pointer in Java
/**
*
* @author Bahrun
*/
class NilaiMatkul {
String nim;
String nama;
String nilai;
@bahrunnur
bahrunnur / StackDinamik.java
Created October 21, 2012 14:08
Dynamic Stack implementation with Java
/**
*
* @author Bahrun
*/
class NilaiMatkul {
String nim;
String nama;
double nilai;
@bahrunnur
bahrunnur / StackStatik.java
Created October 21, 2012 14:06
Implementasi Stack Statis dengan bahasa pemrograman Java
/**
*
* @author Bahrun
*/
class NilaiMatkul {
String nim;
String nama;
double nilai;