Category Archives: international phonetic alphabet

Drawing linguistic structure trees

The LaTeX way

I use LaTeX to make my trees—the qtree package for simple trees, and xyling for anything more complicated like prosodic structures, Hasse diagrams, etc. For detailed instructions and links, see the LyX Wiki for Linguists. This page explains not only how to do syntax trees but also how to draw moraic structures, how to include IPA in a syntax tree, and so on.

Standalone applications

There are several standalone programs, both webapps and desktop apps, that you can use to enter tree structures, and they will render the structures as pictures for you. I like  phpSyntaxTree: Given the input [S [NP [N Trees]] [VP [V grow] [PP in apps]]], this produces a PDF with the following image.

php syntax tree demo

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

It also supports Unicode now so you can use IPA in your trees as well as have math symbols in your labels.

For desktop apps specific to your OS, do a search–there is definitely stuff out there for Windows and Macs, although there may no longer be support for the apps because they tend to be a labor of love sort of thing.

The Fingerpainting Method

In Libre Office, Microsoft Office, and no doubt other programs, you can draw the trees by tabbing the words into position and adding the lines using the line drawing tool. Here is what I got when I did this in Libre Office. (In order to make it look like that, I had to individually right-click on every line and change the color to black, because it defaults to blue and I couldn’t stand that and I could not be assed to figure out where the defaults are.) So, as you can see, the method is slow and ugly, but it has some benefits.

libre office line drawn tree

  1. It works when you do not have an internet connection.
  2. The tree is entirely contained in your document and uses the same fonts as your text, so even though you get an ugly tree, the fonts match
  3. There is no need to worry about embedding fonts in your PDF file, unlike the Arboreal method (next).
  4. You do not have to learn even the rudimentary bracketing syntax that phpSyntaxTree and others require, so if you are really afraid of any sort of structure and notations, this method is for you. Then again, if you are this afraid of structure, you should probably give up because linguistics might not be for you.

 

 

 

Arboreal and Moraic

This is an old approach to drawing trees. You tab or space your words into position and switch to the font, which provides characters that look like lines at different angles. There’s a triangle or two. The output looks more consistent than the fingerpainting method above. Notice that the screenshot on the right has the red spellchecker underline–it’s because the lines are actually characters, and the LibreOffice spellchecker treats them as (ill-formed) text. The red lines would not be visible in the PDF.

 

 

 

 

 

This method has many downsides, however.

  1. The fonts are proprietary and cost $20 each.
  2. These predate Unicode so modern computers don’t know what to do with them unless they have been converted to pictures first. So these fonts need to be explicitly embedded in the PDF or else they render as capital Gs, etc.
  3. The limitations of the characters restrict what types of trees you can draw—for example, the triangles only come in a few sizes.
  4. I spent about 10 minutes henpecking around the keyboard looking for the right characters to show you, and the font kept switching back to the default text font. The key map on my OS did not even know how to render these characters, so I was flying blind.

 

Comments Off on Drawing linguistic structure trees

Filed under international phonetic alphabet, trees, tutorials

International Phonetic Alphabet fonts and keyboards

Introduction

This page explains how to set up International Phonetic Alphabet IPA fonts and keyboard layouts on your computer.

Keyboard layouts allow you to enter IPA fonts directly by hitting key combinations, as explained below. I work with the IPA a lot, so I find  keyboard entry indispensable.

Which font to get?

  • Most modern computers should already have some fonts that can display IPA characters. But what you sometimes see is some characters appearing in a different font than the rest of the text, like this:

lucida_grande_switch

  • This is because many fonts only have a partial Unicode character set, which covers the standard (Latin alphabet) ASCII set but not much more. Your computer will substitute a more comprehensive font if its default font lacks the IPA characters. On Mac OS, this is Lucida Grande, for example.
  • I like Linux Libertine and Linux Biolinum. The fonts are freely distributed under a GNU Public License, and they work on any OS.

libertine

  • Another popular font is Doulos SIL. See the SIL webpage for details. I think it’s kind of ugly.

How to use the fonts: Web interface

  • This is the slow but universal way. It even works on iOS and Android.
  • Go to ipa.typeit.org. You can point and click on any IPA symbol with your mouse or finger, and the character will appear in the text box.
  • From there, you can copy and paste the transcriptions into your document writing program, then change the font of the doc to Linux Libertine if you like, and you’re done.

IPAtypeit

OS-specific Methods

These are much faster and more efficient. Invest some time into learning them and you will save yourself time in the long run.

Windows

  • Check out this page, ipa4linguists. It explains how to use the Character Map, and also covers the various quirks of Windows.
  • I found one IPA keyboard layout for Windows. I cannot vouch for this thing, but if it works, that is by far the most efficient way of working with IPA fonts (see the next section on Macs).

Mac OS

The IPA-SIL keyboard layout

  • These instructions should be current as of Mac OS 10.8x and 10.9x.
  • I use the IPA-SIL keyboard layout, which I am providing it for download here since SIL is no longer distributing or supporting it. The zip file includes a PDF with more detailed documentation.
  • The keyboard layout allows you to type in IPA without using “dead keys” (keystroke sequences that turn into a single character, for example, typing “i” and then “=” gives you “ɪ”). Ain’t nobody got time for that.
  • Here is the workflow:
    • hitting Cmd+Space switches the input method from English to IPA-SIL.
    • Once in IPA-SIL mode, you can type normal lowercase Latin characters without doing anything.
    • If you press the Shift key while typing s, i, f, d, t, q, n, you get  ʃ, ɪ, ɤ, ɾ, ð, θ, æ, ŋ respectively (The keyboard map shows you which keys do what, though you do not need to use the keyboard map to enter the keys):
What your keyboard will type in IPA-SIL when "Shift" is depressed

What your keyboard will type in IPA-SIL when “Shift” is depressed

  • Pressing Alt+Shift accesses these:
Alt+Shift on the IPA-SIL keyboard layout

Alt+Shift on the IPA-SIL keyboard layout

  • And Alt alone accesses these:

Alt on the IPA-SIL keyboard

  • For anything else, you can use the Character Viewer on Mac OS. Just open it from your Input Methods menu (which can be enabled from Settings>Keyboard).

Installing the IPA-SIL Keyboard

  • There are more detailed instructions in the PDF inside the zip file linked above.
  • The basic procedure is:
    • put the IPA-SIL.keylayout file into Users/yourusername/Library/Keyboard Layouts. Put the IPA-SILicns icon file there as well.
    • then enable the IPA-SIL keyboard by going to Settings>Language & Text > Input sources. Scroll down the long list of keyboards until you see IPA-SIL; if you don’t see it, you might need to restart the machine. Then check it.
    • Check on “Show input menu in menu bar”.
  •  Mac OS likes to take away features, especially ones that allow you to customize the system. If you cannot see the Library folder inside your Users/yourusername directory, go to your favorite search engine and look for the solution that is specific to your version of Mac OS.

Linux

  • The only method I was able to get going on Linux is ipa-x-sampa. It’s reasonably user-friendly and does not require a million steps that result in failure, like SIL’s Keyman thing. In order to use ipa-x-sampa, you need to enable IBus, and then
    apt install ibus-table-ipa-x-sampa

    If that fails, there is also Character Map type thing that you can use.

  • For some non-IPA characters that linguists use, it was suprisingly difficult to figure out how to enter them on Linux. The crucial bit (on Linux Mint, anyway, but probably others too) is to enable a “Compose Key” in your keyboard layout. Go to Preferences>Keyboard>Layouts, select “English (US)”, then Options, then find “Position of Compose Key”. I chose Caps Lock for mine. What this does is allow you to type various characters like é and ü by pressing the Compose Key together with ‘ or “, etc. A list of all the default key combinations enabled in Linux can be downloaded as a tab-separated text file here.

iOS and Android

  • Go to your “App store” or whatever and search for “IPA keyboard”, or “IPA phonetics”.

Comments Off on International Phonetic Alphabet fonts and keyboards

Filed under international phonetic alphabet, tutorials