10000 GitHub - chpeer/divergent-association-task: The Divergent Association Task is a brief measure of creativity
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chpeer/divergent-association-task

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Divergent Association Task code

The DAT measures creativity in under 4 minutes. It involves thinking of 10 unrelated words. Creative people choose words with greater semantic distances between them.

See our manuscript in PNAS titled Naming unrelated words predicts creativity for more details.

Online version

Try the task and see your score at datcreativity.com.

Installation

You can install this library directly from GitHub using pip:

pip install git+https://github.com/jayolson/divergent-association-task.git

Download and extract the GloVe model file (glove.840B.300d.zip) from https://nlp.stanford.edu/projects/glove/ and place it in your project directory.

Alternatively, you can install manually by following these steps:

  1. Clone this code:
    • git clone https://github.com/jayolson/divergent-association-task.git
  2. Install Python 3 and pip.
  3. Download the dependencies and model:
  4. Try it:
    • python3 examples.py

Examples

See examples.py:

import dat

# GloVe model from https://nlp.stanford.edu/projects/glove/
model = dat.Model("glove.840B.300d.txt", "words.txt")

# Compound words are translated into words found in the model
print(model.validate("cul de sac")) # cul-de-sac

# Compute the cosine distance between 2 words (0 to 2)
print(model.distance("cat", "dog")) # 0.1983
print(model.distance("cat", "thimble")) # 0.8787

# Compute the DAT score between 2 words (average cosine distance * 100)
print(model.dat(["cat", "dog"], 2)) # 19.83
print(model.dat(["cat", "thimble"], 2)) # 87.87

# Word examples (Figure 1 in paper)
low = ["arm", "eyes", "feet", "hand", "head", "leg", "body"]
average = ["bag", "bee", "burger", "feast", "office", "shoes", "tree"]
high = ["hippo", "jumper", "machinery", "prickle", "tickets", "tomato", "violin"]

# Compute the DAT score (transformed average cosine distance of first 7 valid words)
print(model.dat(low)) # 50
print(model.dat(average)) # 78
print(model.dat(high)) # 95

Data

For open data (8,900 participants from 98 countries), see https://osf.io/kbeq6/.

Credits

By Jay Olson at Harvard University.

The dictionary (words.txt) is based on Hunspell by László Németh.

License

MIT

About

The Divergent Association Task is a brief measure of creativity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.5%
  • Makefile 12.5%
0