Linux 45-56-67-123 5.14.0-503.16.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Dec 13 01:47:05 EST 2024 x86_64
Apache/2.4.62 (AlmaLinux) OpenSSL/3.2.2
: 45.56.67.123 | : 18.117.70.50
Cant Read [ /etc/named.conf ]
8.3.15
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
afra /
py.afaa.website /
mara1_model /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
combine_related_words.py
3.35
KB
-rw-r--r--
get_stopwords.py
868
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : combine_related_words.py
# /var/www/afra/py.afaa.website/mara1_model/combine_related_words.py from pythainlp.corpus import thai_words def combine_related_words(tokens): """รวมคำที่ควรอยู่ติดกันเพื่อลดช่องว่างฟุ่มเฟือย และเตรียมสำหรับการฝึกในอนาคต""" thai_words_set = thai_words() related_pairs = { "เกาะ": ["เต่า", "พังงา", "สมุย"], "ภาคใต้": ["ไทย"], "จังหวัด": ["ชุมพร"], "มีชื่อเสียง": ["การเกษตร"], "ธรรมชาติ": ["ความสมบูรณ์"], "นักท่องเที่ยว": ["ชอบความสงบ"], "กิจกรรม": ["กลางแจ้ง"], "มีความสำคัญ": ["ประวัติศาสตร์"], "เมือง": ["ชายหาด", "ชายหาดสวยงาม"], "ชายหาด": ["สวยงาม", "ทรายขาว", "ยอดนิยม"], "หาด": ["ทราย", "ทุ่ง", "ทรายขาว", "ทรายรี"], "จุด": ["เริ่มต้น", "ชมวิว"], "ห่าง": ["กรุงเทพฯ"], "ประชากร": ["ราว"], "ศูนย์กลาง": ["การค้า"], "พระอาทิตย์": ["ตก", "ตกดิน"], "ท้อง": ["ถิ่น", "ฟ้า"], "จุดชมวิว": ["เขามัทรี", "หาดทรายรี"], "เหมาะสำหรับ": ["นักท่องเที่ยว", "การพักผ่อน", "ดำน้ำ"], "หาดทราย": ["รี"], "น้ำ": ["ใส", "นวล"], "ทราย": ["ขาว", "ละเอียด"], "ศาล": ["กรมหลวงชุมพร"], "สภาพอากาศ": ["ร้อนชื้น"], "ฤดู": ["ฝน", "แห้ง"], "อายุ": ["4,000"], "พิพิธภัณฑ์": ["ชาติ"], "พายุ": ["ไต้ฝุ่น"], "สงคราม": ["ฝรั่งเศส", "โลก"], "ประตู": ["ภาคใต้", "การท่องเที่ยว"], "แหล่ง": ["พักผ่อน", "ท่องเที่ยว"], "จักรวรรดิ": ["ศรีวิชัย"], "ราง": ["เหล็ก"] } result = [] i = 0 while i < len(tokens): current = tokens[i] combined = current if i + 1 < len(tokens): next_token = tokens[i + 1] potential_combo = current + next_token # รวมคำถ้าอยู่ใน related_pairs ก่อน แล้วค่อย thai_words if current in related_pairs and next_token in related_pairs[current]: combined = potential_combo i += 1 elif potential_combo in thai_words_set: combined = potential_combo i += 1 result.append(combined) i += 1 return result
Close