The first thing you should know about me is that I don't like unstated assumptions.
The world is a complicated place, and our small minds can barely hope to fully grasp it. So, I'll pretend that I'm a good writer and you can pretend you're interested in reading about what sounds like a confused dating profile.
It's not a dating profile.
I like long walks on the gravely beaches of Alberta, pina colada flavored bubble tea, and getting caught in a try/catch exception. My pastimes include coding, making impeccable websites, making peckable websites (*insert chicken peck*), and guitar. If you'd like a website like this one, and would like to pay me for it, head over to the freelance (*link*) section. If you'd like to hear more options, please press 2. (*insert dial popup*)
In all seriousness, I wrote this website to help market myself as I move to freelancing and just really to show others what a website can be and what kinds of things that websites nowadays are capable of. Of course I don't claim to have the fanciest website around, but it loads quick, it's quirky (if I do say so), and it represents who I am. Coincidentally, that's also what kinds of things I'd like to work on for freelancing.
Ok, so like, I know this is a totally impossible project but why not. I want to first make something which can learn from sentences which I give to it. I say “jump”, it says “how high?”. But seriously, I want something which can understand the semantics of a sentence and incorporate that into it’s pre-existing semantical network. It’s not computer consiousness per-se but it’s a precursor to it from the way I see it.
ghsh gets it’s name from the anime/manga Ghost in the Shell. I cite a couple sources below but here are some extra ones just to get you thinking:
After a bit of research, I found this helpful for a way to link sentence trees (which I learnt from here) to semantical nets, and what a good semantical net might look like. So let’s try an example: “dogs have 4 legs” can be understood as
At first the links were distinct classes from nodes. The nodes being concepts like
If we take a tangent for a bit, we can think of the fact that things like
Another neat thing is consider the sentence
And finally, another thing to consider is that even though every concept so far has had a name behind it, I should be able to include concepts (which might represent another concept net somewhere else) which have no explicit name but can of course still be explained by doing a sort of (what I like to call a) “stack unload”. A stack unload being the things you have to say to someone to explain a concept to them given that you know what they know on the subject. So “to know this you must first know all these other things, then I’ll explain how they relate”
All this is getting really vague, so let’s see some code (Python):
After messing around with KNodes (contained within a KNet, shown later) I realized that nodes weren’t able to link to a specific part of another node. Consider the sentence “he likes the girl who wore the green dress” which will also be used later. In this sentence, there was
Applying this (using a KNet) directly we can build links like so:
A couple things to note: I don’t make a distiction between ‘is’ and ‘are’ for now, because this is semantics, not syntax. There are also duplicates of things; this is because there’s ‘with’ the concept
Then, we see the use of KPorts with 15
There is also something called ‘referring’ which shows the generic concept that a specific instance is referring to. So
To see what I’m getting at, consider the way problems are subdivided in engineering and technology in general. nltk has subdivided language processing into tagging, chunking, chinking and other such problems. But we need less division to make things more human. So then, why not create a single gigantic function to solve all those problems; incorporating in it all the information needed. Well, 1. that’s ugly and 2. we don’t need to abandon problem-division, we just need feedback from the upper layers.
Here’s an example: I tried to find a way to get the sentence tree of “I shot an elephant in my pyjamas”, an example provided in the nltk docs. Only there was no way to get the sentence tree without cutting corners. I ended up using the
Giving the following sentence trees:
“CFGChartParser” stands for context-free grammar, a further type of black-box attempting to understand a sentence without considering that the tag assigned to certain words is fluid and not set in stone. Just like in the sentence “students like to study”, the tagger will turn this into “
So what I need to beat this problem is a way for the tagger to try again when the chunker fails, and the chunker to try again when the semantics fail (“when pigs fly” being an idiomatic illogical phrase). But I need to go a step further as well, since the meaning of a sentence is not the first meaning found but rather the most probable meaning of it. Having a syntactical error or semantical error is simply a way to reduce that probability to
Instead of the brute-force CFG parser, I also tried a built-in CFG parse but that only returned a single sentence tree to save time, and I tried a statistical parser but that was such a black-box of black-boxfuscation that I had no clue how to make it generic. Think about this: what if you replaced the part of your brain that handles sentence processing (assume it’s in the same spot) with a chip that “told” you what the sentence means, would you still understand sentences? I think yes, but only because once language is learnt you rarely need to learn more of it. You’ve already gone through the battering of life-experience that lead you to understanding words. What you wouldn’t be able to do is understand sentences that sound like something significant but aren’t really (I’m assuming the chip performs a single function of parsing sentences and is truly the black box in which it resembles) like “believe
This is going back to the earlier paragraph, where having magical boxes that complete a function is not really how the brain works. If anything, the brain can create such magical boxes for temporary usage on the fly and does so constantly. So the end result to me would look like a sort of multi-threaded process (to speed things up) going through trees of meaning/syntax/grammar in order of which was most probable and continuing until a top-level net decides that that was the correct meaning and reinforcing that breadcrumb trail by increasing the probability of the parser/chunker/tagger to pick that branch of the tree in the future; Thus becoming better at finding the “most common” or “most probable” meaning of things, a bit like the brain.
So, after switching instead to a brute-force tagger that I wrote (at first having an abysmal number of known words) I had the following code for my sentence parsing:
Where, in this case,
END OF POST
Archived from my old website. I still think about this post now and then, I didn’t “accomplish” anything but for me it helped lay out what are the problems we’re trying to solve in AI, NLP and so forth. Alot of times if you want to learn this stuff it’s behind a thick lens of academic nonsense (not to mention paywalls), buzzwords, ego, and dryness that it ends up being inaccessible to the everyday Jane.
Like, reduce your hyperplanes all you want dude, I’m not gonna stop you, but at least tell me what you think a complex quadra-manifold is in relation to thought.
things I made
In no order (TODO: add images, reformat as grid)
- Arduino Guitar Pedal
- 4Score Iphone game
- Soundcloud scraper
- Raspberry Pi Wireless Sampler
- Home-made touch screen
- Software modular audio synthesiser
- Experiments in natural language processing and machine learning
- LED control circuits withh arduino
- Arduino spatula bot controlled by twitch
- Github commit viewer
- Auditory github commit viewer
- App for geotagging landmarks and commenting (anonument)
- Redid computer engineering wordpress site
- This website
- Experiments in DSP for face/eye tracking
- Homemade unofficial calendar for the 2015 Edmonton Fringe
- GPS path viewer
- Scrolling RPG platformer for GameJam
- Experiments in genetic programming
- Experiments in GPU programming (CUDA/WebGL)
- Encoding images from phone onto reel to reel tapedeck
- Program to take screenshots of Ionic phone apps
- Tool to see how frequently JS code is run (js-hist)
- Multi-user poetry app with unique suggestion UI
- Online signal for when to go to the bar in school
- Unfinished procedurally generated space RPG
- Discover Alberta app
- Enroute Taxi Advertising System
- Forestry radio tower registry
- Timesheet management system
- Home appliance maintenance app
- U of A Rutherford house tour app
- Social restaurant marketing app (MyTab)