What can the French avant-garde teach us about search?


March 10, 2017
Alfred Jarry cycling. (Image from Wikimedia Commons)
Alfred Jarry cycling. (Image from Wikimedia Commons)

“What can the French avant-garde teach us about search?”. I spent the winter of 2015 through 2016 investigating this very question. From England to Virginia, in the halls of academia a small group of researchers have been diligently working away. Applying ideas from the French Playwright Alfred Jarry’s (Wikipedia,Jarry, 2017) canon of literature, they hope to find new, interesting ways of transforming the world of search.

Thus what could the results of a search engine such as http://pata.physics.wtf/ possibly mean for how we think about finding information on the web?

Why would searching for the word bicycle via this engine return images of a water bottle, key or tortilla chip jammed into somebody’s arm (give it a try and see what images come back)?

pataphysicssearch

Since the early days of Google and Yahoo, our ability to search for data to answer questions or hone in on a topic in the wilds of the web has become ever more refined. But some, such as Professor Andrew Hugill (Wikipedia, Hugill, 2017), argue this has taken away from the explorative nature of early search engines.

How then have search engines like pata.physics.wtf challenged this world?

Enter ‘pataphysics.

‘Pataphysics: a science of imaginary solutions

The French playwright Alfred Jarry became infamous amongst the theatre goers of Belle Époque Paris at the end of the 19th century. His plays were raucous affairs with the 1896 opening of the controversial Ubu Roi descending into riot as the final curtain went down.

Over the years, Jarry’s works, such as Dr Faustroll Pataphysician, would go onto explore a pseudo-philosophy he called ‘pataphysics.

‘Pataphysics (yes the ‘ belongs there) is often defined as:

“… the science of that which is super induced upon metaphysics, whether within or beyond the latter’s limitations, extending as far beyond metaphysics as the latter extends beyond physics. … ‘Pataphysics will be, above all, the science of the particular, despite the common opinion that the only science is that of the general. ‘Pataphysics will examine the laws governing exceptions, and will explain the universe supplementary to this one.” (Jarry 1996)

In essence, ‘pataphysics is a philosophy that looks at the exception, rather than the rule. Jarry and other followers of this ‘imaginary science’ constructed a number of categories of phenomena that help us to explain these exceptions. These can be summed up as:

Clinamen

The essence of a clinamen is a slight swerve from the norm. Canadian experimental poet Christian Bök defined the clinamen as: “the smallest possible aberration that can make the greatest possible difference”. (Bök 2002).

For those familiar with Jarry’s work, his most notorious clinamen they are likely to have read is “merdre” a mutation of the French word merde (we leave it to you the reader to Google that term).

The addition of the ‘r’ has changed the original word to something that makes the original vulgar term sound even harsher in its native French. In the world of computing the clinamen has been realized in code form through the application the Damerau-Levenshtein distance, where changing 1 letter in a word reveals a different word with often considerable difference in meaning.

Syzygy

The syzygy has its root in the realm of astronomy. The term refers to the alignment of three celestial bodies such as the Sun and Earth being in conjunction with the Moon.

Outside of the field of astronomy the concept has been adopted by both poets and philosophers.
It is therefore not surprising that it has found its way from philosophy into ‘pataphysics where it is used in the context of a pun resulting in something unexpected.

An example of such a pun in the world of search is looking for the term “weed” and being presented with the word “band”. The user may have intended the initial search to mean an uncultivated plant growing in a flower patch. However by returning the word “band” the initial search term is thrown it into a different context. Now we have the initial word taking on the meaning drugs, and the result being either a reference to a rock band and associated drug use or a secondary meaning – the prohibition of drugs.

Antinomy

Most readers will be familiar with the term antinomy as it is used to define the mutually exclusive. The term thus sums up symmetry and incompatibility. Examples include good and evil and plus and minus.

Synonym

Synonyms are of course two words that in essence mean the same thing. We might use the words ‘ground’ and ‘land’ in a synonymous fashion for example.

The beauty of synonyms is in their wordplay however. Two words can reference the same concept, but in fact have a difference in meaning. In our example ground and land can whilst being synonyms also be unrelated, where ground can mean to grind something up.

Anomaly

Jarry said ‘pataphysics is “the law that governs exceptions” and an anomaly is the disrupter of order, the exception that proves the rule.

If ‘pataphysics sees the world (a rule in itself) as a stream of unique events then surely an anomaly is an oxymoron? However it is here we find that the anomaly exists through contradicting itself. A anomaly therefore is a pataphysical exception within the rule that renders the rule no longer a rule.

It was from these categories that Hughill constructed the idea of patadata. This would be a ontological/taxonomic format for representing the association between a search term and a search result, with the results being one of the categories above.

Thus, rather than take an input term and find more relevant results, using a patadata structure we hope to return more explorative terms. Based upon Hugill’s paper ‘pataphysics and computing we can see an example of what such a result may look like:

Query = “Good”
Patadata = [Fine(synonym), Evil(antinomy), Carrot(anomaly), Moral(syzygy), Hood(clinamen)] 

This set can then be further used by a search engine to return links to a user based upon the five pataphysical categories. The result is a search experience quite different to that of a traditional search engine such as Google.

Early work has been done in implementing the ideas expressed by Andrew Hugill, Fania Raczinski, James Hendler and Johanna Drucker.

Zhang, Zou, Jing and Yang of Bath Spa University at the 2016 IEEE Symposium on Service-Oriented System Engineering presented an approach to incorporating pataphysical concepts with the semantic web. Their paper discussed the application of a pataphysical ontology in OWL format, with an MVC architecture as part of a General Framework of Creative Computing. (Zhang et al. 2016) This proposed structure would be built upon a Java and Apache Jena based stack, with a JSP, JavaScript, HTML and CSS front end.

For those interested in experimenting with these ideas at home however a simpler Python approach is available.

Patalib – a Python library for exploring ‘pataphysics

The Patalib Python package was a byproduct of the winter of research I conducted. It functions around the idea of using an English word list such as that found in Linux and the Python Natural Language Toolkit. Each search class generates a JSON object in a format similar to Hugill’s patadata structure.

The libraries home page can be found hosted on GitHub at the following URL:

https://andydennis.github.io/patalib/

A packaged version of the library can also be installed via pip from pypi:

https://pypi.python.org/pypi/patalib/0.0.2

To install the library via pip run:

pip install patalib

Alternatively the source code can be cloned from GitHub:

https://github.com/andydennis/patalib

And also installed via pip. Remember to use the -e flag to install a local repository from source.

Once you have PataLib installed, it’s time to experiment with generating some results from an input term. First however you will need the wordnet corpus.

This can be downloaded using the following command:

python -m nltk.downloader wordnet

Once it has finished downloading you can start writing your first program.

Create a new empty file called pata.py and copy and paste in the following application:

from patalib import PataLib
from patalib import Antonym, Synonym, Syzygy, Anomaly, Clinamen

test = Synonym().generate_synonym("cheese")
print test

test = Antonym().generate_antonym("good")
print test

test = Syzygy().generate_syzygy("cheese")
print test

test = Anomaly().generate_anomaly("cheese", ["parrot","rabbit"], 1)
print test

test = Clinamen().generate_clinamen("gum", ["hum","gym"], 1)
print test

The first three of these classes rely upon values stored in the wordnet corpora for returning their values. The last two however require further input from the user. In this instance we have included a small list of two items, however this could of course be a dictionary of English words, such as the one mentioned that exists in Linux.

The generate_anomaly method takes an additional parameter of an integer value. This tells us how many anomalies we would like to search for. Our list only has two values, so we only have the choice of 1 or 2 here realistically.

Like generate_anomaly the generate_clinamen method also takes a numerical value as its last parameter. This is used to set the Damerau Levenshtein distance, that being the amount of “swerve” we want the algorithm to use.

Each of these methods returns a dictionary object of the following format:

{'input' : input word, 'results' : results, 'category' : category type}

Here the input will be the input word, the results a list of matches and the category the category type for example anomaly, clinamen etc.

Run the script via python pata.py and you will see the results displayed on the screen.
And that’s really all there is to it. With a simple script you have generated some search results via the Python NLTK that implements pataphysical ideas.

Conclusion

At first glance the idea of applying a pseudo-philosophy from 100 years ago to computing might seem absurd, but you may already be unconsciously making use of manu of the ideas described here.
When you explore WIkipedia, perhaps starting with the word cat and find yourself 20 minutes later reading an article on the Habsburg Empire. Through a series of what seem to be unrelated links one topic flows into another.

Hopefully this article has opened your mind to some interesting ideas for improving search in ways that can replicate the fun that can be had by exploring Wikipedia.

References

Wikipedia.org (2017) Alfred Jarry. Available from:
https://en.wikipedia.org/wiki/Alfred_Jarry [24 January 2017]

Wikipedia.org (2017) Andrew Hugill. Available from:
https://en.wikipedia.org/wiki/Andrew_Hugill [24 January 2017]

Andrewhugill.com (2015) ’Pataphysics and Computing. Available from: http://andrewhugill.com/writings/Pataphysics%20and%20Computing.pdf [1 March 2016].

Bök, C. 2002. ‘Pataphysics: The Poetics of an Imaginary Science. Evanston IL, USA. Northwestern University Press.

Jarry, A 1996, Exploits & Opinions of Dr. Faustroll Pataphysician. Boston USA, Exact Change. pp 26.

Zhang L et al (2016) “An Approach to Constructing A General Framework for Creative Computing: Incorporating Semantic Web” 2016 IEEE Symposium on Service-Oriented System Engineering. pp. 297 – 306


Dennis_Andy square
Andy Dennis is a Senior Full Stack Architect at Modus Create with over 14 years experience in software engineering and management. His interests include security, creative computing, the implementation of pataphysics in computing and the Internet Of Things. A published author, he has five books on the subject of the Raspberry Pi, Arduino and Home Automation available at all good book stores. Andy holds degrees in Software Engineering and Creative Computing, and is pursuing a Masters in Information Security.


What We Do

We’ll work closely with your team to instill Lean practices for ideation, strategy, design and delivery — practices that are adaptable to every part of your business.

See what Modus can do for you.

LET'S GET STARTED

We're Hiring!

Join our awesome team of dedicated engineers.

Loading...

APPLY NOW