ThaiSenLoy 1.0.3

dotnet add package ThaiSenLoy --version 1.0.3
NuGet\Install-Package ThaiSenLoy -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ThaiSenLoy" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ThaiSenLoy --version 1.0.3
#r "nuget: ThaiSenLoy, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ThaiSenLoy as a Cake Addin
#addin nuget:?package=ThaiSenLoy&version=1.0.3

// Install ThaiSenLoy as a Cake Tool
#tool nuget:?package=ThaiSenLoy&version=1.0.3

Thai Sentiment Analytic by Loy [ThaiSenLoy]

DOI

วิเคราะห์ประโยคหรือข้อความภาษาไทยว่าให้ความรู้สึกในทางลบหรือไม่ สามารถนำไปใช้ภายใน app ต่าง ๆ เช่น web app, mobile app

ก่อนใช้งาน

  1. ดาวน์โหลดไฟล์ MLModel.zip จาก https://github.com/laploy/ThaiSenLoy/tree/master/ThaiSenLoy%20source%201.0/ThaiSenLoy/Model
  2. สร้าง folder ชื่อ Model ใน root folder ของ Application เช่น ขณะกำลังดีบักใน Visual Studio ให้ใส่ใน bin\Debug\netcoreapp3.1>
  3. นำไฟล์ MLModel.zipไปใส่ใน folder Model เช่น ขณะกำลังดีบักใน Visual Studio ให้ใส่ใน bin\Debug\netcoreapp3.1>\Model

Prediction

ถ้าผลลัพธ์ของการ predict เป็น true แสดงว่าเป็นอย่างใดอย่างหนึ่งต่อไปนี้

  • ข้อความมีความรู้สึกในทางลบ
  • ข้อความมีคำไม่สุภาพ
  • ข้อความมีคำหยาบคาย

ถ้าผลลัพธ์ของการ predict เป็น false แสดงว่าเป็นอย่างใดอย่างหนึ่งต่อไปนี้

  • ข้อความแสดงความรู้สึกในทางบวก
  • ข้อความไม่แสดงความรู้สึกใด ๆ เช่นประโยคบอกเล่า
  • เป็นประโยคคำถาม

Traning Data Set

Data Set ที่ใช้ train มีข้อความที่เป็นประโยคภาษาภาษาไทยทั้งสิ้น 24,561 ข้อความ 3,934,610 ตัวอักษร แบ่งเป็นประโยคให้ความรู้สึกกลาง ๆ ประโยคคำถาม ข้อความเชิงตำหนิ และข้อความด่า

ตัวอย่างคำที่มีความหมายกลาง ๆ

  • จัน จ้า จูน เจ้ ใช่ ดูๆ โด่ ตัง ตัว เตง เตร ถูก โถ่ เทส เทอ นะๆ นี้ บ่ๆ บาย ปี๊ ฝาก มาๆ มึง แม่ ยัง ยี๋ เย้ แยก ลดๆ ลอง

ตัวอย่างคำให้ความรู้สึกทางลบ

  • ไม่กินจบ ไม่รู้คะ สาขาน้อย เสียใตไง เสียเวลา หยุดก่อน อีใจร้าย เออแพง55 กุแพ้โซฟี จะอ้วก!!! ดีแม๊กอืด ตอแหลป่าว ตะเตือนไต โนวมันนี่ บ่กินลีโอ เพลียยยยย

ตัวอย่างคำหยาบคาย

  • ระยำ ทมิฬ ลูกโสเภณี ควย หี เจี๊ยว แดก ขี้ นรกแดกกบาล เศษนรก กวนส้นตีน ล่อกัน เอากัน เยี่ยว ขึ้แตก เย็ด

ตัวอย่างประโยคที่มีความหมายกลาง ๆ

  • อาทิตย์หน้าไปโดนกัน
  • อาทิตย์หน้าหยุดนะ55
  • อ้าวเครๆเเพรวเลี้ยง
  • มันเป็นญาติกับไอ้ฤทธิ์กินเเบล็คใช่มั้ย
  • มาร่วมกันร่วมเล่นสนุก ขับนิสสันกันเถอะ
  • มาแล้ววววว แต่รอบนี้มีสตรอเบอร์รี่ด้วย
  • มีแต่ของแดกลดเว้ยตูนเว้ย อัญชลี วงษ์ดี
  • มียารักษาริดสีดวงและมะเร็งลำไส้มั๊ยค่ะ

ตัวอย่างประโยคที่ให้ความรู้สึกทางลบ

  • ต้องดักตีแม่มไอพวกนี้
  • ต่างจังหวัดไม่มีเซงไป
  • ติดบุหรี่ไฟฟ้าว่ะแม่ง
  • แต่ปวดหัวเพราะแดกช้าง
  • ทำไมฮอทพอทไม่มีกุ้งคะ
  • แท็กอีกล้าวอิเหี้ยยยย

ตัวอย่างประโยคคำถาม

  • อ้าวไม่ไปเรียนละหรอ
  • อิดอก เช้านี้เลยแมะ
  • อิ่มกับการเที่ยวยัง
  • ทำไมที่เรากินไม่มีใส้
  • มีของเชฟเทรลเบลเซอร์หรือเปล่าครับเทอิน
  • เมื่อถามจีน่าว่าบิวตี้บุฟเฟ่มีโปรไหม??

Package ID

ThaiSenLoy

Version

1.0.0

Owner

laploy

Language

C# 8.0

Compatible Frameworks

ThaiSenLoy สามารถทำงานได้กับ project ที่ใช้ framework ต่าง ๆ ตามรายการข้างล่าง ตัวเลขทางขวาคือหมายเลข version ขั้นต่ำสุดที่จะสามารถใช้ได้

  • .NET Standard 2.0
  • .NET Core 2.0
  • .NET Framework 1 4.6.1 2
  • Mono 5.4
  • Xamarin.iOS 10.14
  • Xamarin.Mac 3.8
  • Xamarin.Android 8.0
  • Universal Windows Platform 10.0.16299
  • Unity 2018.1

Authors

Laploy V. Angkul

Creative Commons Attribution 4.0 International Public License

Tags

C# .NET Standard ML Machine Learning Thai Sentiment analysis Loy Laploy

Corpus file structure

ThaiSenLoy example 1.0 source code ตัวอย่างวิธีใช้ ThaiSenLoy

  • Example
    • Example.csproj
    • Program.cs
  • ThaiSenLoy.sln

ThaiSenLoy source 1.0 source code ThaiSenLoy

  • ThaiSenLoy.sln
    • ThaiSenLoy
    • Model
      • MLModel.zip *** Machine Learning Model
    • ThaiSen.cs
  • ThaiSenLoy.csproj

Usage and Example

https://github.com/laploy/ThaiSenLoy

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 2,467 3/30/2020
1.0.2 427 3/30/2020
1.0.1 451 3/29/2020
1.0.0 434 3/29/2020

Bug fix