fix: standardize SSA Auditorium locations#143
fix: standardize SSA Auditorium locations#143Deepak8858 wants to merge 2 commits intoUTDNebula:developfrom
Conversation
KBui4
left a comment
There was a problem hiding this comment.
It would be better to standardize to the room number not the room name, so SSA 13.330 instead of SSA Auditorium, since currently, the parser will incorrectly return "Other" for the event's room.
This is because the parser looks for the building abbreviation and room numbers first, as they are way more common and easier to parse with regular expressions. The parser only falls back to checking for building names and using the room name if those regular expressions fail to capture anything.
Specifically, the scraped locations tend to have the following structure:
- [building with abbreviation / random place], [building abbreviation] [room number / name]
- [building with abbreviation / random place]
So after failing to find a room number, the parser checks if rooms exist by splitting the string at the comma if one exists; otherwise, it assumes that without the comma indicating a room, it will just be the building name or some other place.
If someone specifically needs "SSA Auditorium", the whole location string is included in the Event itself with that info, or they could map the room number to the name.
|
|
||
| // Standardize SSA Auditorium locations | ||
| if location != nil && (strings.Contains(*location, "SSA 13.330") || strings.Contains(*location, "SSA Auditorium")) { | ||
| standardized := "SSA Auditorium" |
There was a problem hiding this comment.
This should be standardized as "SSA 13.330".
There was a problem hiding this comment.
If the location really needed to be parsed to SSA Auditorium, then standardize after parsing the building and room, not before like here.
|
Additionally, there are some other locations that can be standardized. There are some events with the location SP/N Gallery which fails to parse the building due to the /. Also, I have seen a few events with either Ballrooms or some combination of Ballrooms A, B, and C. The other auditoriums tend to be fine; they tend to include both the name and the room number. But atriums are the other places where the location might mix up room numbers and names, though typically the events mention atriums by name. |
Standardize SSA 13.330 and SSA Auditorium to a single "SSA Auditorium" location for consistency.
Fixes #142