Skip to content

Commit

Permalink
支持git lfs
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa committed Jul 23, 2021
1 parent 34ad1ff commit 2cf4948
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 19 deletions.
13 changes: 0 additions & 13 deletions cmd/modelconverter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,6 @@ func main() {
defer oFd.Close()
gw := gzip.NewWriter(oFd)
defer gw.Close()
/*
zipWriter := zip.NewWriter(oFd)
defer zipWriter.Close()
fInfo, err := fd.Stat()
if err != nil {
log.Fatalln(err)
}
zipFile, err := zipWriter.Create(fInfo.Name())
if err != nil {
log.Fatalln(err)
}
*/
if sentimentModel {
var jsonModel bayes.Model
err = json.NewDecoder(fd).Decode(&jsonModel)
Expand Down
3 changes: 3 additions & 0 deletions model/cws.model
Git LFS file not shown
3 changes: 3 additions & 0 deletions model/kg.model
Git LFS file not shown
3 changes: 3 additions & 0 deletions model/ner.model
Git LFS file not shown
3 changes: 3 additions & 0 deletions model/pos.model
Git LFS file not shown
3 changes: 3 additions & 0 deletions model/sentiment.model
Git LFS file not shown
6 changes: 0 additions & 6 deletions utils/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ func StringInSlice(arr []string, i int) string {
// StringSliceInRange 获取[]string中from-to位置字符串
func StringSliceInRange(arr []string, from int, to int) []string {
l := len(arr)
<<<<<<< HEAD
if from <= -1*l && to <= -1*l {
return []string{}
}
if from >= l {
return []string{}
}
=======
>>>>>>> f940ad9 (init commit)
return arr[idxInSlice(l, from) : idxInSlice(l, to-1)+1]
}

Expand All @@ -48,15 +45,12 @@ func RuneFromIndex(w []rune, i int) string {
// RuneInRange 从from到to截取字符串
func RuneInRange(w []rune, from int, to int) string {
l := len(w)
<<<<<<< HEAD
if from <= -1*l && to <= -1*l {
return ""
}
if from >= l {
return ""
}
=======
>>>>>>> f940ad9 (init commit)
return string(w[idxInSlice(l, from) : idxInSlice(l, to-1)+1])
}

Expand Down

0 comments on commit 2cf4948

Please sign in to comment.