<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>linguistics &middot; Arguable Intelligence</title><link>https://ojmason.net/tags/linguistics/</link><description>Personal musings on computational linguistics, AI, sailing, and generated fiction.</description><language>en-gb</language><managingEditor>Oliver Mason</managingEditor><webMaster>Oliver Mason</webMaster><lastBuildDate>Thu, 12 Nov 2009 00:00:00 +0000</lastBuildDate><atom:link href="https://ojmason.net/tags/linguistics/index.xml" rel="self" type="application/rss+xml"/><item><title>Sentence Disambiguation – Modality to the Rescue!</title><link>https://ojmason.net/sentence-disambiguation-modality-to-the-rescue/</link><guid isPermaLink="true">https://ojmason.net/sentence-disambiguation-modality-to-the-rescue/</guid><pubDate>Thu, 12 Nov 2009 00:00:00 +0000</pubDate><category>linguistics</category><category>modality</category><description>I’m currently reading a new book on iPhone development, iPhone Advanced Projects by Apress. I will probably talk about that book in a later post, but today I will just focus on one sentence I came across on page 212:
I also adore the capability that I have to flag articles from folks I follow on Twitter and save them to Instapaper.
This sentence has (at least) two readings, which are probably only obvious to a linguist (and who else would care?); I highlight the differences by adding commas:</description><content:encoded><![CDATA[<p>I’m currently reading a new book on iPhone development, <a href="http://www.amazon.co.uk/gp/product/1430224037?ie=UTF8&amp;tag=phrasysnlp-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=1430224037"><em>iPhone
Advanced Projects</em></a>
by Apress. I will probably talk about that book
in a later post, but today I will just focus on one sentence I came
across on page 212:</p>
<p><em>I also adore the capability that I have to flag articles from folks I follow on Twitter and save them to Instapaper.</em></p>
<p>This sentence has (at least) two readings, which are probably only
obvious to a linguist (and who else would care?); I highlight the
differences by adding commas:</p>
<ol>
<li>I adore the capability, that I have to flag articles…</li>
<li>I adore the capability that I have, to flag articles…</li>
</ol>
<p>In the first case you adore the capability. And the capability is
that you have to do something (flag articles). Sounds rather odd,
doesn’t it? The second case is more clear-cut and easy to understand:
you can flag articles, and that’s the capability you have and adore.</p>
<p>So in terms of <a href="https://en.wikipedia.org/wiki/Pattern_grammar">pattern grammar</a>,
you’re either looking at <em>N that</em> or
<em>N <em>to</em>-inf</em> with <em>capability</em>. If you consult the <a href="http://www.amazon.co.uk/gp/product/1424008255?ie=UTF8&amp;tag=phrasysnlp-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=1424008255">Cobuild Dictionary</a>,
you’ll find that <em>capability</em> only occurs with the second pattern,
the <em>to</em>-infinitive, so that you can rule out the first reading.</p>
<p>Another possibility would be to look at it in terms of <a href="http://en.wikipedia.org/wiki/English_modal_auxiliary_verb">modality</a>:
here we could argue that <em>capability</em> prospects a modality of ability,
but <em>have to</em> expresses obligation; the two don’t go together. Hence
the first reading sounds odd, as a capability does not usually force
you to do anything, but rather enables you. It could, however, be
used to signal sarcasm or irony, as in (the obviously made up) <em>I
really like that my new computer gives me the capability to have
to save my work every five minutes</em>. This is clearly an odd sentence,
suggesting that modality works along similar lines as <a href="http://en.wikipedia.org/wiki/Discourse_prosody">discourse
prosody</a> as described by Louw (1993) [for the full reference follow
the previous link].</p>
<p>Here we have discussed two ways of disambiguating a sentence, one
based on grammatical properties (or typical environments), and one
on a non-syntactic phenomenon (modality). Pattern grammar allows
us to identify what the typical usage would be, whereas modality
explains to us why the first reading is at odds with the corresponding
words. Now all we need is a ‘pattern grammar’ for modality!</p>
]]></content:encoded></item><item><title>Collocations – Do we need them?</title><link>https://ojmason.net/collocations-do-we-need-them/</link><guid isPermaLink="true">https://ojmason.net/collocations-do-we-need-them/</guid><pubDate>Tue, 03 Mar 2009 00:00:00 +0000</pubDate><category>linguistics</category><category>collocations</category><description>The concept of collocation was introduced in the middle of the last century by J.R. Firth with his famous quote “You shall know a word by the company it keeps”. Words are not distributed randomly in a text, but instead they stick with each other, their ‘company’. Starting in the late 1980s, the increased interest in collocation by computational linguists and others working in NLP has lead to a proliferation of methods and algorithms to extract collocations from text corpora.</description><content:encoded><![CDATA[<p>The concept of collocation was introduced in the middle of the last
century by J.R. Firth with his famous quote “You shall know a word
by the company it keeps”. Words are not distributed randomly in a
text, but instead they stick with each other, their ‘company’.
Starting in the late 1980s, the increased interest in collocation
by computational linguists and others working in NLP has lead to a
proliferation of methods and algorithms to extract collocations
from text corpora.</p>
<p>Typically one starts with the environment of the target (or node)
word, and collects all the words that are within a certain distance
(or span) of the node. Then their frequency in a reference corpus
is compared with their frequency in the environment of the node,
and from the ratio of frequencies we determine whether they’re near
the node by chance or because they’re part of the node’s company.
A bewildering variety of so-called significance functions exists,
the oldest probably being the <em>z</em>-score, used by Berry-Rogghe in 1973;
later, Church and Hanks (1991) popularised mutual information and
<em>t</em>-score, which now seem to have been displaced by log-likelihood
as the predominant measure of word association.</p>
<p>The problem is: all these metrics yield different results, and
nobody knows (or can tell) which are ‘right’. Mutual information,
for example, favours rare words, while the <em>t</em>-score promotes words
which are relatively frequent already. But apart from rules-of-thumb,
there exists no linguistic justification why one metric is preferable
to another. It is all rather ad-hoc.</p>
<p>Part of this is that collocation as a concept is rather underspecified.
What does it mean for a word to be ‘significantly more common’ near
the node word as opposed to be there just by chance? In a sense,
collocations are just diagnostics: we know there are words that are
to be expected next to <em>bacon</em>, and we look for collocates and find
<em>rasher</em>. Fantastic! Just what we expected. But then we look at <em>fire</em>,
and find <em>leafcutter</em> as a very significant collocate. How can that
happen? What is the connection between <em>fire</em> and <em>leafcutter</em>? The
answer is: <em>ants</em>. There are <em>fire ants</em>, and there are <em>leafcutter ants</em>,
and they are sometimes mentioned in the same sentence.</p>
<p>This leads us to an issue which I believe gets us on the right track
in the end: the fallacy of using the word as the primary unit of
analysis. In the latter example, we’re not dealing with <em>fire</em> and
<em>leafcutter</em>, we’re instead concerned with <em>fire ants</em>. Once we realise
that, then it is perfectly natural to see <em>leafcutter ants</em> as a
collocate, whereas we would be surprised to find <em>engine</em>, which
instead is a collocate of the lexical item <em>fire</em>.</p>
<p>So, phraseology is the clue. If we get away from single words, and
instead consider multi-word units, then we also have an explanation
for collocations. Single words form part of larger MWUs, together
with other single words. So <em>leafcutter</em> often forms a unit with <em>ants</em>,
as does <em>fire</em>. More generally, MWUs such as <em>parameters of the model</em>
are formed of several single words, and here we can observe that
<em>parameters</em> and <em>model</em> occur together. But they form a single unit
of analysis, and only if we break up this unit by considering single
words, then we can observe that <em>parameters</em> and <em>model</em> commonly occur
together.</p>
<p>From this we can define a very simple procedure to compute collocations:
from a corpus, gather all the MWUs that are associated with a
particular word. Get a frequency list of all the single word items
in those MWUs, sort by frequency, and there we are.</p>
<p>To conclude, <em>collocation is an epiphenomenon of phraseology</em>, a
side-effect of words forming larger units. Phraseological units
contain multiple single words, and those are picked up by collocation
software, because those are the ones that commonly occur in a text
together. And the reason for occurring together is that they form
a single unit. Once we look at text in terms of MWUs, the need for
collocation disappears. Collocation just picks out the constituent
elements of multi-word units.</p>
<p>One could of course argue that this is a circular argument, that
we are simply replacing a procedure to calculate collocations by
one that calculates MWUs. But the difference between those two
procedures is that MWU-recognition does not require complicated
statistics (which I find hard to see justification for), but instead
simply looks at recurrent patternings in language. MWUs are re-usable
chunks of texts, which can be justified on the grounds of usage.
Collocation is a much harder concept to explain and integrate into
views of language. And, as it turns out, we don’t really need it
at all.</p>
<h2 id="references">References</h2>
<dl>
<dt>Berry-Rogghe, G.L.M. (1973)</dt>
<dd>“The Computation of Collocations and Their Relevance in Lexical Studies.” in The Computer and Literary Studies. Eds. A.J. Aitken, R.W. Bailey and N. Hamilton-Smith. Edinburgh: Edinburgh University Press, p 103-112.</dd>
<dt>Church, K., and Hanks, P. (1991)</dt>
<dd>“Word Association Norms, Mutual Information and Lexicography,” Computational Linguistics, Vol 16:1, p 22-29.</dd>
<dt>Firth, J. R. (1957)</dt>
<dd>“A Synopsis of Linguistic Theory 1930-1955” in Studies in Linguistic Analysis, Oxford: Philological Society.</dd>
</dl>
]]></content:encoded></item></channel></rss>