Logo
Explore Help
Sign In
titor/yoyo
1
0
Fork 0
You've already forked yoyo
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
Files
ceed48244429dbd95be3afa7ae7770957637b4e4
yoyo/internal/content/content.go

18 lines
247 B
Go
Raw Normal View History

feat: add content filter and code processing module (v0.3.0) - Add content filter module (internal/content/) - Implement basic character filtering (control chars, line breaks, symbols) - Implement code block and inline code detection - Implement comment detection for 30+ languages (JS/Python/Go/HTML/etc) - Add go-enry dependency for intelligent language detection - Add SkipKeywords config option (default: TODO/FIXME/HACK/XXX/etc) - Integrate content processing into Translator - Update config.yaml with skip_keywords
2026-03-29 18:41:25 +08:00
package content
import (
"github.com/go-enry/go-enry/v2"
)
const (
Version = "1.0.0"
)
func DetectLanguage(text string) string {
return enry.GetLanguage("", []byte(text))
}
func Filter(text string) string {
return FilterBasic(text, nil)
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 26ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API