github.com/fluffy-melli/korcen-go/v2

Rewritten Golang module based on the 'Tanat05/korcen' (Python) module, adapted to Golang syntax.


Keywords
badword-censor, badwordsfilter, censorship, golang, korcen, swearword
License
Apache-2.0
Install
go get github.com/fluffy-melli/korcen-go/v2

Documentation

Korcen.go

Go Version Module Version

KR / EN

131_20220604170616

πŸ›  μ œμž‘μž

Tanat05 / korcen

https://github.com/Tanat05/korcen
---------------------------------
이 ν”„λ‘œμ νŠΈλŠ” 원본 `korcen` ν”„λ‘œμ νŠΈλ₯Ό μˆ˜μ •ν•˜μ—¬ λ°°ν¬ν•œ κ²ƒμž…λ‹ˆλ‹€.
원본 ν”„λ‘œμ νŠΈλŠ” `https://github.com/Tanat05/korcen`μ—μ„œ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.

이 ν”„λ‘œμ νŠΈμ˜ λΌμ΄μ„ΌμŠ€ λ˜ν•œ Apache-2.0 을 λ”°λ₯΄κ³  μžˆμŠ΅λ‹ˆλ‹€

gyarang / gohangul

https://github.com/gyarang/gohangul
-----------------------------------
이 ν”„λ‘œμ νŠΈλŠ” `gohangul` 을 μ‚¬μš©ν•΄μ„œ λ°°ν¬ν•œ κ²ƒμž…λ‹ˆλ‹€.
ν•΄λ‹Ή ν”„λ‘œμ νŠΈλŠ” `https://github.com/gyarang/gohangul`μ—μ„œ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.

ν•΄λ‹Ή ν”„λ‘œμ νŠΈμ˜ λΌμ΄μ„ΌμŠ€μΈ MIT License λ˜ν•œ λ”°λ₯΄κ³  μžˆμŠ΅λ‹ˆλ‹€

Apache-2.0

korcen-goλŠ” Apache-2.0 & MIT License λΌμ΄μ„ μŠ€λ₯Ό λͺ¨λ‘ λ”°λ₯΄κ³  μžˆμŠ΅λ‹ˆλ‹€. μ½”λ“œλ₯Ό μ‚¬μš©ν•  경우 λΌμ΄μ„ μŠ€ λ‚΄μš©μ„ μ€€μˆ˜ν•΄μ£Όμ„Έμš”.

CopyrightΒ© All rights reserved.


❓ μ£Όμš” κΈ°λŠ₯

[λΆ€μ μ ˆν•œ μ–Έμ–΄ 감지]
- 일반적인 λΆ€μ μ ˆν•œ μ–Έμ–΄
- κ²½λ―Έν•œ λΆ€μ μ ˆν•œ μ–Έμ–΄
- 성적 μ–Έμ–΄λ‚˜ ν‘œν˜„
- λΉ„ν•˜ν•˜λŠ” ν‘œν˜„
- 인쒅 차별적인 λΆ€μ μ ˆν•œ ν‘œν˜„
- λΆ€λͺ¨λ₯Ό λΉ„ν•˜ν•˜κ±°λ‚˜ κ³΅κ²©ν•˜λŠ” μ–Έμ–΄
- μ •μΉ˜μ  λΆ€μ μ ˆν•œ μ–Έμ–΄λ‚˜ ν‘œν˜„
- μ˜μ–΄μ—μ„œ λΆ€μ μ ˆν•œ ν‘œν˜„
- μΌλ³Έμ—μ„œ λΆ€μ μ ˆν•œ ν‘œν˜„
- μ€‘κ΅­μ—μ„œ λΆ€μ μ ˆν•œ ν‘œν˜„
- 기타 νŠΉμˆ˜ν•œ λΆ€μ μ ˆν•œ ν‘œν˜„

⬇️ μ„€μΉ˜ 방법

mod

$ go get github.com/fluffy-melli/korcen-go
L v0.7.0 버전 μ΄ν›„λ‘œ ν•¨μˆ˜ 좜λ ₯이 λ‹¬λΌμ‘ŒμœΌλ―€λ‘œ μ‚¬μš©μ‹œμ— μœ μ˜ν•΄μ£Όμ‹œκΈ° λ°”λžλ‹ˆλ‹€

golang μ½”λ“œ 예제

package main

import (
	"fmt"

	"github.com/fluffy-melli/korcen-go"
)

func main() {
	// Discord Message Event Logic
	ck := korcen.Check("MESSAGE")
	if ck.Detect {
		dtif := ck.Swear[0]
		message := ck.NewText[:dtif.Start] + "\x1b[1m\x1b[41m\"" + ck.NewText[dtif.Start:dtif.End] + "\"\x1b[0m" + ck.NewText[dtif.End:]
		discord_ansi := "```ansi\n" + message + "\n```"
		fmt.Println(discord_ansi)
	}
	// Discord Send Logic
}