Code Monkey home page Code Monkey logo

metameric's Introduction

metameric

Metameric is a simulator for Interactive Activation (IA) networks. Interactive Activation networks are localist connectionist models, which means that their neurons uniquely identify a single concept, e.g. one letter neuron for each letter, or a word neuron for each word. Interactive Activation was first introduced in McClelland & Rumelhart (1981), but has been used widely in the field computational psycholinguistics.

Unlike distributed connectionist models, which have been supported by a variety of useful tools and toolkits, no such toolkit exists for localist connectionist modeling. Metameric intends to fill this gap.

It is first and foremost meant to be a out-of-the-box simulator for the canonical IA model, but is easily extensible to other models, such as TRACE.

innovations

Metameric includes several innovations which allows the IA model to simulate stimuli of different lengths out of the box, and is, to our knowledge, the first simulator to do so.

These innovations are:

  • Negative input features
  • Space padding the input
  • Weight adaptation

These three innovations are fully explained in the companion paper, which has been accepted for publication to the Mental Lexicon.

Name

The name Metameric comes from the short story The White Death by polish author Stanisław Lem:

The hereditary and at the same time perpetual ruler was Metameric, for he
possessed a cold, beautiful and many-membered frame, and in the first of
these members resided his mind; when that grew old, after thousands of years,
when the crystal networks had been worn away from much administrative
thinking, its authority was taken over by the next member, and thus it went,
for of these he had ten billion.

Usage

First make sure all requirements in requirements.txt are installed.

pip

pip install -r requirements.txt

conda

conda install --yes --file requirements.txt

Then install using

python3 setup.py install

Then, you can run metameric with.

python3 -m metameric -i MY_INPUT_FILE -o MY_OUTPUT_FILE

For a quick example, use example.csv as MY_INPUT_FILE You can also try normal preparation by running the prepare function.

python3 -m metameric.prepare -i example_orth.csv -o example.csv -d orthography --decomposable_names letters -f letters --feature_sets fourteen

This turns a normal word csv with fields for orthography and frequency into data which can be fed into a full IA model. This can be used with the English Lexicon Project out of the box, for example.

python3 -m metameric.prepare -i elp-items.csv -o test.csv -d Word --decomposable_names letters -f letters --feature_sets fourteen --disable_strict

disable_strict is added because not all items in the elp are completely alpha-numeric, and hence can't be featurized by our feature set

You can also use the web interface.

python3 -m metameric.web

Again, use example.csv as a quick example.

metameric's People

Contributors

janithwanni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

metameric's Issues

Add robust option for slot-based phonology

Currently we don't have a nice way for the user to signal she is inputting a phonological representation which should be represented as slots.

This can be partially solved by constraining phonology to valid IPA characters and falling back to wordkit.phonology.CVTransformer.

Example: user puts in ædz as a phonological representation, which in slots is: ___æ_dz_.

Preprint for Metameric

Hi, do you mind making a preprint for your paper in the Mental Lexicon available?
I've been having a hard time finding it (and my Uni doesnt subscribe to the journal). Thanks!

Hard Wired Numpy Header files in setup.py install

There seems to be an error when trying to run setup.py install within an virtual environment where the script gives out the following error.
creating build/temp.macosx-10.6-intel-3.5/metameric/core

/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c metameric/core/metric.c -o build/temp.macosx-10.6-intel-3.5/metameric/core/metric.o

metameric/core/metric.c:444:10: fatal error: 'numpy/arrayobject.h' file not found

#include "numpy/arrayobject.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated. error: command '/usr/bin/clang' failed with exit status 1

I believe the issue can be remedied by editing the setup.py file to include the numpy folder as mentioned in this answer here
I will write the changes and see if they are working and submit a pull request @stephantul ?

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.