A band has already announced Friday's gig on Facebook, they've done the work once, and asking them to copy it into Sound of Jersey gives them another website to update. Keeping track of every band myself would give me rather a lot to do in the evenings. I also have a full-time job. I'd like to start with the announcements people are already making. The scanner can follow links to Facebook events. Recognising a gig from the words in a post would be lovely too, but that's still something I'm researching with machine learning. The links give me somewhere to start.

A venue might share an event created by the band, so asking only for the venue's own events misses a gig sitting right there in its posts. I keep a carefully curated list of band and venue pages, the scanner reads their events, then it looks through recent posts for links to other Facebook events.

“See you Friday” isn't much of a listing, but the event link contains an ID I can follow to get the title, time and place without guessing them from the post. Both routes feed the same collection. Events whose start time has passed get left out.

I still choose the pages. There are bounds to this. It's a list of places worth checking rather than a search of all Facebook for music.

The scan runs at midnight and checks posts from the previous two days. Yesterday's posts get another go. If a venue shares a Friday gig on Tuesday and that night's scan fails, Wednesday's run can still find it, so one missed evening doesn't automatically mean a missed announcement. I'd rather check twice than depend on every run happening exactly when it should.

The request only brings back a limited batch of posts. A busy page can lose an announcement from that batch. Two days can't fix that.

One gig is enough

Finding the same gig again is the point, until I save it again too. Before saving, the scanner checks whether the Facebook ID is already in the database and uses that record if it is. Three pages mentioned Friday night. That doesn't give me three gigs.

The rescan updates it, well, it updates a timestamp. It doesn't copy all the changed details across.

What if it's moved? The band may now be playing on Saturday, the scanner has found the announcement again, and unless I correct the local listing myself I'm still sending people out on the wrong night. Finding an event again and keeping it current are separate jobs (and I would quite like the second one done too).

For a new event, the scanner copies the details and tries to match the place to a known venue using its Facebook place ID or name.

No match, no pub. It falls back to the island. That leaves me something to check without pretending it knows the venue.

Finding it isn't checking it.

New events go into the admin approval queue. The place needs checking and the description tidying, and somebody has to decide whether the gig belongs. Regular nights need attention too. “Tuesday sessions” doesn't tell the scanner to repeat an event every week, so I set that in the local calendar and let it work out the upcoming dates. It only goes so far ahead. Every Tuesday until the end of time is more than I need.

That's still work. I can spend an evening checking gigs instead of visiting all those Facebook pages and copying them over, though.

Could it learn what a gig announcement looks like?

Videos such as MarI/O - Machine Learning for Video Games got me interested in machine learning. Now I'm wondering about posts without a neat event link. I'd like to detect patterns in the text so an announcement can be found even when it doesn't match a hardcoded rule.

I met a guy at a conference who was working on machine learning. He convinced me it could solve this problem, and when I asked him how, he said he didn't know, but it could be done.

So where do I start? I can recognise an announcement when I read one. Giving a program examples of announcements and ordinary posts is another job, then I've got to find out whether it has learnt anything useful. Examples to collect, labels, a way of checking....

For now the scanner follows event links and the admin queue checks what it finds. Posts written in people's own words are the next problem to investigate.

If you've tried something like this, I'd really like to hear how you got started.

This entry came over from blog.haddon.me. I’ve tidied up the grammar and flow, bringing it closer to how I write now. I used AI to help with the grammar, structure and flow. I have dyslexia, and my writing often comes out as a rambling scrawl, so it can be hard to see what I was actually working on at the time. I think the tidied versions are easier to digest and more interesting to read. The artefacts got the same tidy-up while I was at it.

  • Related article

    Sound of Jersey

    People are using Sound.je. Now I'm opening up the code too.