Skip to content

Conversation

@wannaphong
Copy link
Member

From PyThaiNLP/pythainlp#856, newmm has updated the rule. I added the regex to up-to-date nlpo3.

@Gorlph
Copy link
Contributor

Gorlph commented Nov 26, 2023

r"(?x)^[\u0E00-\u0E7F \t\r\n]"

อันนี้เข้าใจว่าต้องการทดสอบว่าขึ้นต้นด้วยอักขระไทยแล้วตามด้วย \tหรือ\rหรือ\n ใช่มั้ยครับ ถ้าใช่ก็จะต้องแก้เป็น r"(?x)^[\u0E00-\u0E7F][\t\r\n]"

@wannaphong
Copy link
Member Author

r"(?x)^[\u0E00-\u0E7F \t\r\n]"

อันนี้เข้าใจว่าต้องการทดสอบว่าขึ้นต้นด้วยอักขระไทยแล้วตามด้วย \tหรือ\rหรือ\n ใช่มั้ยครับ ถ้าใช่ก็จะต้องแก้เป็น r"(?x)^[\u0E00-\u0E7F][\t\r\n]"

ยกเว้นภายในทั้งหมดครับ

@bact bact requested a review from Gorlph November 27, 2023 17:34
@bact bact added the enhancement New feature or request label Nov 27, 2023
@bact
Copy link
Member

bact commented Nov 27, 2023

ตอนนี้ในเวอร์ชัน Python มันใช้ | เพื่อ early return ไม่แน่ใจว่าของ Rust มันไล่ลำดับ regex ยังไง

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants