Code Monkey home page Code Monkey logo

jiebago's People

Contributors

wangbin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jiebago's Issues

invalid memory address or nil pointer dereference

package main

import (
	"log"

	"github.com/wangbin/jiebago"
)
var seg jiebago.Segmenter
func main() {
	log.Println(seg.CutAll("我来到北京清华大学"))
}
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x1 addr=0x28 pc=0x4bcf13]

goroutine 4 [running]:
sync.(*RWMutex).RLock(...)
        C:/Go/src/sync/rwmutex.go:48
github.com/wangbin/jiebago.(*Dictionary).Frequency(0x0, 0xc0001c5dd8, 0x3, 0x20, 0xc0001c5dd8)
        C:/Users/amz/Desktop/gotest/src/github.com/wangbin/jiebago/dictionary.go:54 +0x33
github.com/wangbin/jiebago.(*Segmenter).dag(0x625688, 0xc0001c5ea0, 0x9, 0x20, 0x9)
        C:/Users/amz/Desktop/gotest/src/github.com/wangbin/jiebago/jieba.go:118 +0xbe
github.com/wangbin/jiebago.(*Segmenter).cutAll.func1(0x4fe190, 0x1b, 0x625688, 0xc000010060)
        C:/Users/amz/Desktop/gotest/src/github.com/wangbin/jiebago/jieba.go:303 +0x9d
created by github.com/wangbin/jiebago.(*Segmenter).cutAll
        C:/Users/amz/Desktop/gotest/src/github.com/wangbin/jiebago/jieba.go:301 +0x86
exit status 

编译教程示例时报错

jie.go:6:2: found packages jiebago (dictionary.go) and main (jie.go) in /home/yu/go/src/github.com/wangbin/jiebago
我把教程中的内容保存在jie.go文件中后,使用go build jie.go时出现错误,不能编译

求问如何解决

Build Error: go build -o c:\Users\tieto\Downloads\91porn_spider-master\score__debug_bin3440546766.exe -gcflags all=-N -l .

spider91/score

.\score.go:14:20: undefined: gojieba.Jieba
.\score.go:22:15: undefined: gojieba.NewJieba (exit status 1)

Index Out Of Range in TextRankWithPOS

In analyse/textrank.go
TextRankWithPOS function:
the line:

for j := i + 1; j < i+span && j <= len(pairs); j++

will cause an index out of range panic
when i = len(pairs) - 1 (the last element of the pairs)

change j <= len(pairs) to j < len(pairs) should fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.