Giter Club home page Giter Club logo

hw3's Introduction

hw3: Collostructional analysis

作業領取連結

作業要求

  1. 從 PTT 自行爬取文章、清理後,對文本進行 collostructional analysis (Collexeme Analysis, Distinctive Collexeme Analysis, Covarying Collexeme Analysis 三擇一)
  2. 繳交期限: 2021-01-17

繳交內容

  1. 資料前處理 (資料爬取與清理、斷詞與 PoS tag): preprocessing.R (or .py)
  2. Collostructional analysis: (distinctive/covarying_)collexeme_analysis.R (or .py)
    • 如果使用 Gries 的 coll.analysis.r 進行分析,檔案內需包含將資料處理成 coll.analysis.r 所要求之輸入格式的程式碼,並且在程式註解內記錄下自己使用的分析選項 (執行 coll.analysis.r 時,它要你選擇與輸入的那些資訊)
  3. 分析結果
    • 請在 README.md (這份檔案,請刪除目前的內容) 內簡要說明:
      1. 進行了哪些分析 (Collexeme Analysis, Distinctive Collexeme Analysis, Covarying Collexeme Analysis)
      2. Construction 的定義 (i.e., 如何透過程式找出這種 construction)
      3. 分析結果檔案名稱:表格資料或 Jupyter Notebook 等,記錄分析的數值資訊 (e.g., 至少需有 attraction 與 repulsion 最強的前十名排序與分數)。如果使用 coll.analysis.r,可直接使用其輸出的表格 (.tsv 檔)

小提示

  1. Collostructional analysis 的提出者 Stefan Th. Gries 有提供 collostructional analysis 的 R script,關於 collostructional analysis 的三種分析所需的資料輸入格式見 http://www.stgries.info/teaching/groningen/index.html
  2. 師大陳正賢老師有線上教科書示範如何 R 進行 Collexeme Analysis:https://alvinntnu.github.io/NTNU_ENC2036_LECTURES/constructions-and-idioms.html
  3. 關於 Python 的 Distinctive Collexeme Analysis 與 Covarying Collexeme Analysis 的實作可以參考 https://github.com/lopentu/hocor2020-GramColl (品質不保證)
  4. 目前各位遇到最大的問題可能不是 collostructional analysis 本身而是如何透過程式去找出自己想要的 construction:
    • 最粗製的方式是將爬回來的文章進行斷詞與 PoS tag 後,再將結果合併當成字串處理,如此便可以透過 regular expression 去找出想要的 construction。例如,將文章處理成下方的字串格式(<詞彙>_<PoS> <詞彙>_<PoS> ...)之後,便可透過 把_P \S+_N[a-zA-Z]* \S+_V[a-zA-Z]*(RegEx) 去抓出所有的把字句:
      你_Nh 要_D 把_P 重心_Na 置於_VC 家人_Na 身_Na 上_Ncd ,_COMMACATEGORY
      而_Cbb 不_D 是_SHI 把_P 重心_Na 放_VC 在_P 工作_VA 。_PERIODCATEGORY
      整_Neqa 天_Nf 把_P 心思_Na 放_VC 在_P 工作_Na 卻_D 不管_Cbb 家人_Na 實在_D 很_Dfa 糟_VH
      應該_D 多_D 把_P 時間_Na 花_VC 在_P 有_V_2 意義_Na 的_DE 事情_Na 上_Ng
      
    • 比較精準的方式是使用漢唐與琼玉介紹的方式,以比較複雜的資料結構去表徵語料(建立微語料庫),再透過程式實作簡單的語料查詢功能。我最近正在將這些功能包成一個 Python 套件 (liao961120/concordancer),基本上已可使用,但說明文件不齊,有興趣的同學可以嘗試使用看看

hw3's People

Contributors

liao961120 avatar amy011872 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.