Skip to content

Instantly share code, notes, and snippets.

View toVersus's full-sized avatar

Tsubasa Nagasawa toVersus

View GitHub Profile
@toVersus
toVersus / get_person_name.go
Created April 7, 2018 11:26
[Language Processing 100 Essentials] #55: Named-entity recognition
package main
import (
"encoding/xml"
"flag"
"fmt"
"os"
)
type Root struct {
@toVersus
toVersus / get_word_tagged_by_pos.go
Created April 6, 2018 12:55
[Language Processing 100 Essentials] #54: Read the result of Stanford Core NLP and prints word, lemma and pos with tab-delimited format
package main
import (
"encoding/xml"
"flag"
"fmt"
"os"
)
type Root struct {
@toVersus
toVersus / read_nlp.go
Last active April 9, 2018 13:25
[Language Processing 100 Essentials] #53: Tokenization
package main
import (
"encoding/xml"
"flag"
"fmt"
"os"
)
type Root struct {
@toVersus
toVersus / get_stem.go
Created April 4, 2018 11:09
[Language Processing 100 Essentials] #52: Get the word and its stem with tab delimited
package main
import (
"bufio"
"flag"
"fmt"
"os"
"github.com/reiver/go-porterstemmer"
)
@toVersus
toVersus / get_words_from_sth.go
Created April 3, 2018 11:21
[Language Processing 100 Essentials] #51: Slice the sentence into words by detecting the whitespace as a token of word separator
package main
import (
"bufio"
"flag"
"fmt"
"os"
"strings"
)
@toVersus
toVersus / break_sth_up.go
Last active April 3, 2018 11:06
[Language Processing 100 Essentials] #50: Break sentence up from the text using pattern match
package main
import (
"bufio"
"flag"
"fmt"
"os"
"regexp"
)
@toVersus
toVersus / extract_noun_tree_pair.go
Created April 1, 2018 14:20
[Language Processing 100 Essentials] #49: Extract all routes of noun tree pair
package main
import (
"bufio"
"flag"
"fmt"
"os"
"sort"
"strconv"
"strings"
@toVersus
toVersus / extract_noun_tree.go
Created March 31, 2018 01:25
[Language Processing 100 Essentials] #48: Extract all roots of syntax tree from the phrases containing noun
package main
import (
"bufio"
"flag"
"fmt"
"os"
"strconv"
"strings"
)
@toVersus
toVersus / extract_function_verb.go
Created March 29, 2018 13:50
[Language Processing 100 Essentials] #47: Mining of function verb syntax
package main
import (
"bufio"
"flag"
"fmt"
"os"
"strconv"
"strings"
)
@toVersus
toVersus / extract_case_pattern_info.go
Created March 28, 2018 12:06
[Language Processing 100 Essentials] #46: Extract all case patterns and outputs tab-delimited set of verb, cases and phrases
package main
import (
"bufio"
"flag"
"fmt"
"os"
"strconv"
"strings"
)