remove print

This commit is contained in:
mii443
2025-07-25 01:33:17 +09:00
parent 4ff16d860a
commit fd40c6ab82
5 changed files with 13 additions and 13 deletions

View File

@@ -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 {