Code Monkey home page Code Monkey logo

psmith's Introduction

What is Psmith?

Psmith is a search tool for the PHOIBLE linguistic database. It lives here.

Which version of PHOIBLE does Psmith use?

The CLLD release, for now; soon it will use PHOIBLE 2.0.

How do I write a search query?

A search query is minimally composed of a search term. There are two types of search term.

A phoneme term consists of a phoneme enclosed in forward slashes, optionally preceded by no. This will find all doculects that have (or don't have, if there's a preceding no) the given phoneme.

For example, /t̪ʙ/ will return all doculects that contain the phoneme represented in PHOIBLE by the text string t̪ʙ, and no /m/ will return all doculects that do not contain the phoneme represented in PHOIBLE by the text string m.

A feature term consists of a number (optionally preceded by a < or > sign), a space, and a string of pluses and minuses followed (with no intervening space) by the name of the feature to search. For example, 2 +coronal will return all doculects with exactly two [+coronal] segments, and >30 +syllabic will return all doculects with more than thirty syllabic segments.

For the numeric component of the feature term, no can be used to mean 0, and any can be used to mean >0.

To search for multiple feature values on the same phoneme, separate the feature components with a semicolon. For example, any +syllabic;+consonantal will return a list of doculects with syllabic consonants.

To limit the search to languages with specific properties, use field:value syntax. To limit the search to languages without specific properties, use !field:value. Values are case-insensitive. For example, country:australia will return all doculects that PHOIBLE lists as spoken in Australia. Spaces in the value must be replaced with underscores, as in country:united_states. The available fields are:

  • source: The contributor of the inventory.
  • language_code: The ISO 639-3 code of the language.
  • language_name: The name of the language according to the source.
  • language_family_root: A four-character abbreviation for the language family or non-cladistic category, out of a set of 107.
  • language_family_genus: The name of the language genus; e.g. Romance, Munda, Semitic, Samoyedic.
  • country: The country in which the language is spoken. Territorially disjunct autonomous constituents (e.g. New Caledonia, Greenland, Guam) are treated as their own countries, but territorially disjunct regions (e.g. Hawaii, French Guiana, Kaliningrad) are not.
  • area: One of the following five values: Africa, America, Asia, Europe, Pacific.
  • population: A population estimate for the language.
  • latitude, longitude: Coordinates for a location in which the language is spoken.

Search terms may be joined by the logical operators and and or. These are postfix.

psmith's People

Contributors

defseg avatar

Watchers

 avatar Justin Silvestre avatar

psmith's Issues

Move to PHOIBLE 2.0 release

There's a new numbered release of PHOIBLE out, so this should use that.

Language statistics (speaker population, latitude and longitude, etc.) aren't included in this release, so that'll have to be pulled from somewhere else. (Glottolog?)

Error on large search : "Cannot enlarge memory arrays"

I've just tried to search an increasingly large phoneme inventory, and it seems that searching more than 7 phonemes causes an error. One search string that reliably causes the error is this:

/t/ /d/ and /p/ and /b/ and /k/ and /g/ and /m/ and /o/

The full error message is as follows:

abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ") at jsStackTrace@https://defseg.io/psmith/sqljs/sql.js:3:13718 stackTrace@https://defseg.io/psmith/sqljs/sql.js:3:13889 abort@https://defseg.io/psmith/sqljs/sql.js:20:8469 abortOnCannotGrowMemory@https://defseg.io/psmith/sqljs/sql.js:3:14756 enlargeMemory@https://defseg.io/psmith/sqljs/sql.js:3:15210 Wt@https://defseg.io/psmith/sqljs/sql.js:12:1 bs@https://defseg.io/psmith/sqljs/sql.js:12:1 Gf@https://defseg.io/psmith/sqljs/sql.js:7:1 de@https://defseg.io/psmith/sqljs/sql.js:7:1 Wd@https://defseg.io/psmith/sqljs/sql.js:7:1 og@https://defseg.io/psmith/sqljs/sql.js:7:1 wh@https://defseg.io/psmith/sqljs/sql.js:7:1 qo@https://defseg.io/psmith/sqljs/sql.js:10:1 Kn@https://defseg.io/psmith/sqljs/sql.js:10:1 ri@https://defseg.io/psmith/sqljs/sql.js:13:1 qi@https://defseg.io/psmith/sqljs/sql.js:13:1 Statement.prototype.step@https://defseg.io/psmith/sqljs/sql.js:20:9992 Database.prototype.exec@https://defseg.io/psmith/sqljs/sql.js:20:15052 psherlock.search@https://defseg.io/psmith/search.js:32:18 @https://defseg.io/psmith/search_request.js:4:34 MessageBus.prototype.publish/<@https://defseg.io/psmith/messagebus.js:19:43 MessageBus.prototype.publish@https://defseg.io/psmith/messagebus.js:19:29 window.Psmith.UI/this.go_el.onclick@https://defseg.io/psmith/ui.js:14:51 If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

The message seems to change if the search is repeated, though I can't find a reliable pattern of why and how, and the error persists even with smaller searches. The only way to make it work properly again is to refresh the page.

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.