mirror of
https://github.com/mii443/AzooKeyKanaKanjiConverter.git
synced 2025-12-03 02:58:27 +00:00
remove print
This commit is contained in:
@@ -177,7 +177,7 @@ final class SwiftTrainer {
|
||||
}
|
||||
}
|
||||
trie.save(path)
|
||||
print("Saved \(path): \(encodedStrings.count) entries")
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ final class SwiftTrainer {
|
||||
attributes: nil
|
||||
)
|
||||
} catch {
|
||||
print("ディレクトリ作成エラー: \(error)")
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -225,9 +225,9 @@ final class SwiftTrainer {
|
||||
buildAndSaveTrie(from: r_xbx, to: paths[4])
|
||||
|
||||
// **絶対パスでの出力**
|
||||
print("All saved files (absolute paths):")
|
||||
|
||||
for path in paths {
|
||||
print(path)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ final class SwiftTrainer {
|
||||
/// ファイルを読み込み、行ごとの文字列配列を返す関数
|
||||
public func readLinesFromFile(filePath: String) -> [String]? {
|
||||
guard let fileHandle = FileHandle(forReadingAtPath: filePath) else {
|
||||
print("[Error] ファイルを開けませんでした: \(filePath)")
|
||||
|
||||
return nil
|
||||
}
|
||||
defer {
|
||||
@@ -245,7 +245,7 @@ public func readLinesFromFile(filePath: String) -> [String]? {
|
||||
// UTF-8 でデータを読み込む
|
||||
let data = fileHandle.readDataToEndOfFile()
|
||||
guard let text = String(data: data, encoding: .utf8) else {
|
||||
print("[Error] UTF-8 で読み込めませんでした: \(filePath)")
|
||||
|
||||
return nil
|
||||
}
|
||||
// 改行で分割し、空行を除去
|
||||
@@ -269,7 +269,7 @@ public func trainNGram(
|
||||
|
||||
for (i, line) in lines.enumerated() {
|
||||
if i % 100 == 0 {
|
||||
print(i, "/", lines.count)
|
||||
|
||||
}
|
||||
let trimmed = line.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
if !trimmed.isEmpty {
|
||||
|
||||
Reference in New Issue
Block a user