Giter Site home page Giter Site logo

maryszmary / conllu-perceptron-tagger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ftyers/conllu-perceptron-tagger

0.0 2.0 0.0 32 KB

A simple perceptron tagger for CoNLL-U files

License: GNU General Public License v3.0

Python 97.51% Shell 2.49%

conllu-perceptron-tagger's Introduction

Data

Serbian

Results

Before (default features; best of 5)

Metrics Precision Recall F1 Score AligndAcc
Tokens 100.00 100.00 100.00
Sentences 100.00 100.00 100.00
Words 100.00 100.00 100.00
UPOS 95.73 95.73 95.73 95.73
XPOS 100.00 100.00 100.00 100.00
Feats 100.00 100.00 100.00 100.00
AllTags 95.73 95.73 95.73 95.73
Lemmas 100.00 100.00 100.00 100.00
UAS 100.00 100.00 100.00 100.00
LAS 100.00 100.00 100.00 100.00

After (see feachers below; best of 5)

Metrics Precision Recall F1 Score AligndAcc
Tokens 100.00 100.00 100.00
Sentences 100.00 100.00 100.00
Words 100.00 100.00 100.00
UPOS 96.19 96.19 96.19 96.19
XPOS 100.00 100.00 100.00 100.00
Feats 100.00 100.00 100.00 100.00
AllTags 96.19 96.19 96.19 96.19
Lemmas 100.00 100.00 100.00 100.00
UAS 100.00 100.00 100.00 100.00
LAS 100.00 100.00 100.00 100.00

Changes

What I tried

  • changing the size of the context analysed, from 1 to 3
  • changing the size of prefix, from 0 to 0:3
  • changing the size of suffix, from last 4 to last 2
  • adding a feature: lengh of token (didn't help)
  • adding a new feature: the last letter in the token
  • adding a new feature: containsNumber (helped a lot
  • adding a new feature: word[0].isupper()

What I used

  • changing the context: -3 +1 words as opposed to -2 +2
  • changing the size of prefix: 0 โ†’ 0:3
  • adding a new feature: the last letter in the token
  • adding a new feature: word[0].isupper()

Overall improvement

From 95.73% to 96.19%.

conllu-perceptron-tagger

A (very) simple perceptron tagger for CoNLL-U files, intended for use as a teaching aid.

This is wholely based on the following code:

I've basically taken the code and wrapped it for parsing CoNLL-U format files.

Usage

Like UDpipe:

Train:

cat kk-ud-train.conllu | python3 tagger.py -t model.dat

Predict:

cat kk-ud-test.conllu | python3 tagger.py model.dat > output

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.