3 ms·
If your source is not consistent enough to give you consistent hyphen there are probably a lot of other weird things that are slipping through the cracks.
by wodenokoto 2y ago
If your source is not consistent enough to give you consistent hyphen there are probably a lot of other weird things that are slipping through the cracks.
- tomcam 2y agoThat's pretty much all real-world datasets
- tracker1 2y agoConsidering how many real world data sets are based on hand crafted spreadsheets, absolutely. Especially with copy pasta. Edit: pasta above was actually meant to be paste, but gesture input is fun. Ironically it's better this way.
- advisedwang 2y agoProbably true, but unless you are suggesting the author should abandon the product/feature, the author needs to achieve the best they can given the constraints. Stuff like fixing hypens gets closer. There's probably a lot more such things their code will end up doing.
- account42 2y agoThe author should use a validating parser instead of a simple regular expression and hoping that the result is correct. I.e. the start of the post should have been that the parser errored out rather than that the result was positive.
- tomcam 2y agoI think I disagree? Should one ever assume a dataset is sanitary?