This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| เราจะไปเดินเล่นที่[LOCATION]หนองคาย[/LOCATION] พร้อมกับนั่งเรือข้ามไป[LOCATION]ประเทศลาว[/LOCATION] | |
| ผมเรียนอยู่ที่[LOCATION]มหาวิทยาลัยขอนแก่น วิทยาเขตหนองคาย[/LOCATION] | |
| ผมเป็นนักศึกษา[ORGANIZATION]คณะวิทยาศาสตร์ประยุกต์และวิศวกรรมศาสตร์[/ORGANIZATION] [ORGANIZATION]มหาวิทยาลัยขอนแก่น วิทยาเขตหนองคาย[/ORGANIZATION] | |
| ผู้อพยพจาก[LOCATION]อเมริกากลาง[/LOCATION]มุดกำแพงเข้า[LOCATION]สหรัฐ[/LOCATION] | |
| ประธาน [ORGANIZATION]สนช.[/ORGANIZATION] เชื่อ [ORGANIZATION]สนช.[/ORGANIZATION]ชุดนี้มีคุณสมบัติเป็นส.ว.ได้ | |
| [ORGANIZATION]กกร.[/ORGANIZATION]ฟันธงปีนี้เศรษฐกิจโตร้อยละ 4.4 | |
| นักวิจัยจากทุนวิจัย [ORGANIZATION]สกว.[/ORGANIZATION] วิจัยถึงต้นตอของปัญหาหมอกควันที่เกิดขึ้นในพื้นที่[LOCATION]ภาคเหนือ[/LOCATION] ซึ่งจะเป็นฐานในการสร้างสรรค์ | |
| [LOCATION]ฮ่องกง[/LOCATION]กลายเป็นเมืองในหมอก | |
| [LOCATION]แคลิฟอร์เนีย[/LOCATION]ตั้งเป้ามีรถไฟฟ้า 5 ล้านคันภายในปี 2573 | |
| [ORGANIZATION]กรมควบคุมมลพิษ[/ORGANIZATION]แนะวิธีแก้น้ำเสียจากสีย้อมผ้าดำ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Apache License 2.0 | |
| file_name="data" # ชื่อไฟล์คลังข้อมูล | |
| import codecs | |
| from pythainlp.tokenize import word_tokenize | |
| from pythainlp.tag import pos_tag | |
| from nltk.tokenize import RegexpTokenizer | |
| import glob | |
| import nltk | |
| import re | |
| #จัดการประโยคซ้ำ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn_crfsuite import scorers,metrics | |
| from sklearn.metrics import make_scorer | |
| from sklearn.model_selection import cross_validate,train_test_split | |
| import sklearn_crfsuite | |
| def doc2features(doc, i): | |
| word = doc[i][0] | |
| postag = doc[i][1] | |
| # Features from current word | |
| features={ | |
| 'word.word': word, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Apache License 2.0 | |
| file_name="data" # ชื่อไฟล์คลังข้อมูล | |
| import codecs | |
| from pythainlp.tokenize import word_tokenize | |
| from pythainlp.tag import pos_tag | |
| from nltk.tokenize import RegexpTokenizer | |
| import glob | |
| import nltk | |
| import re | |
| #จัดการประโยคซ้ำ |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 “ _ PUNCT PUNCT_`` _ 27 punct _ _ | |
| 2 แม้ _ ADP ADP_IN _ 10 mark _ _ | |
| 3 ว่า _ ADP ADP_IN _ 2 fixed _ _ | |
| 4 การเปลี่ยน _ VERB VERB_VV _ 10 csubj _ _ | |
| 5 ไป _ PART PART_RP _ 4 compound:prt _ _ | |
| 6 ใช้ _ VERB VERB_VV _ 4 xcomp _ _ | |
| 7 ระบบ _ NOUN NOUN_NN _ 6 obj _ _ | |
| 8 ดิจิตัล _ ADJ ADJ_JJ _ 7 amod _ _ | |
| 9 เป็น _ AUX AUX_VC _ 10 cop _ _ | |
| 10 สิ่ง _ NOUN NOUN_NN _ 27 advcl _ _ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| สวัสดีชาวโลก | |
| ผมเป็นคนไทย | |
| สบายดีไหม | |
| ทำอะไรอยู่อ่ะ | |
| หิวข้าวแล้ว | |
| เธอชอบกินข้าวมันไก่ | |
| เขาเพิ่งกลับจากโรงเรียน | |
| พรุ่งนี้เป็นวันอะไร | |
| มือถือของนายรุ่นอะไรอ่ะ | |
| เราไปสั่งข้าวที่ร้านอาหารกันไหม |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from subprocess import call | |
| def play(name): | |
| if sys.platform == 'linux': | |
| call(["ffplay",name]) | |
| elif sys.platform == 'darwin': | |
| call(["afplay",name]) | |
| elif sys.platform == 'win32': | |
| call(['start',name]) | |
| else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def hi(): | |
| print("สวัสดีชาวโลก") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from openpyxl import load_workbook | |
| wb = load_workbook(filename = 'sample.xlsx') #อ่านไฟล์ sample.xlsx | |
| sheet_ranges = wb['hello'] #เรียกใช้ worksheet ที่ชื่อว่า hello | |
| print(sheet_ranges['A1'].value) #อ่านค่าจากเซลส์ A1 ใน worksheet ของ hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| public class MyProgram | |
| { | |
| public static void Main(String[] args) | |
| { | |
| int n; | |
| int[] A = new int[4]; | |
| int[] B = new int[4]; | |
| int[] C = new int[4]; |