Code Monkey home page Code Monkey logo

bagnall15's Introduction

Author identification using multi-headed recurrent neural networks

This software was developed for the PAN 2015 author identification challenge.

It uses a multi-headed recurrent neural network (RNN) from the recur project. The recur module is in the form of a Python extension, and to build it you need to have various packages listed in the recur README, and the python-dev package. make charmodel.so is supposed to work.

There is a paper about it on the pan site and an expanded/modified/reviewed version at https://arxiv.org/abs/1506.04891.

This software is copyright Douglas Bagnall and is licensed under the GPL, version 2 or greater.

bagnall15's People

Contributors

douglasbagnall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bagnall15's Issues

Preparing training and testing sets

First of all, thanks for sharing this code of the PAN15 competition.

Second, how should I prepare my own dataset and then train caravel to find the author of my anonymous text?

Compiling problems `‘alphabet’ undeclared (first use in this function)`

I have been trying to compile charmodel.so but I keep having the next error:

$ make charmodel.so
cd recur && git pull
Already up-to-date.
cd recur && make charmodel.so
make[1]: Entering directory `/home/versae/git/caravel/recur'
python setup.py build_ext --inplace
running build_ext
building 'charmodel' extension
gcc-4.9 -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D_GNU_SOURCE -DVECTOR -I. -I/usr/include/python2.7 -c py-recur-text.c -o build/temp.linux-x86_64-2.7/py-recur-text.o -march=native -ggdb -std=gnu11 -I. -Wall -O3 -ffast-math -fno-inline -DVECTOR -DPIC
py-recur-text.c: In function ‘Alphabet_encode_text’:
py-recur-text.c:128:52: error: ‘alphabet’ undeclared (first use in this function)
     u8 *encoded_text = rnn_char_alloc_encoded_text(alphabet,
                                                    ^
py-recur-text.c:128:52: note: each undeclared identifier is reported only once for each function it appears in
error: command 'gcc-4.9' failed with exit status 1
make[1]: *** [charmodel.so] Error 1
make[1]: Leaving directory `/home/versae/git/caravel/recur'
make: *** [recur/charmodel.so] Error 2

I changed to g++-4.9 in the Makefile and export CC and CXX in order for Python to find it, but still failing.

Thanks.

Caravel usage help

I'm trying to reproduce the PAN15 setup for the English corpora right now, but I've got a couple of questions which I can't answer from either your paper or the source code which are:

  • How do I train a model once, save it and then use it for quick classification? pan-test or pan-ensemble don't do that apparently.
  • Which method (pan-test or pan-ensemble) was used for creating the final results and how long did the calculation take?
  • What exactly is the control corpus? From the code I would say it's some additional training mass (e.g. PAN14 corpora).
  • Which corpora (PAN15, PAN14) were used for training, control and testing?
  • Why does pan-test pass the input testing corpus (-i) as training corpus to train-net and why does get_net_and_corpus() in train-net add given test texts to the training texts?
  • Is there a reason why pan-test uses a hedging value of 0.0 while pan-ensemble uses 0.03 for English texts?

It would be great if you could help me with this. Thanks!

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.