Skip to content

Commit

Permalink
修改: bot/adapters/storage/memorystorage.go
Browse files Browse the repository at this point in the history
	重命名:   cli/etc/dict.txt -> etc/dict.txt
	重命名:   cli/etc/idf.txt -> etc/idf.txt
	重命名:   cli/etc/stop_words.txt -> etc/stop_words.txt
  • Loading branch information
TsaoLun committed Aug 15, 2023
1 parent 6527c07 commit 1a87f4c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bot/adapters/storage/memorystorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package storage

import (
"encoding/gob"
"flag"
"fmt"
"log"
"math"
Expand All @@ -27,13 +26,12 @@ var (
idfFile = "./etc/idf.txt"
stopWordsFile = "./etc/stop_words.txt"
generatedStopWordsFile = "./etc/stopwords.txt"
EtcDir = flag.String("etc", "cli", "the etc directory to look for corpora files")
)

func init() {
// 获取当前文件的绝对路径
dir, _ := os.Getwd()
dictFile = path.Join(dir, *EtcDir, dictFile)
dictFile = path.Join(dir, dictFile)
idfFile = path.Join(dir, idfFile)
stopWordsFile = path.Join(dir, stopWordsFile)
generatedStopWordsFile = path.Join(dir, generatedStopWordsFile)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1a87f4c

Please sign in to comment.