This is lame.
Show HN: This Question Does Not Exist
141–143 of 143 posts
Re: Show HN: This Question Does Not Exist
#142I presume this is due to tokenization or something, but there's a lot of extra whitespace in the code samples that make them look very unrealistic: def _ _ init__(self, default): " " " See if the default value for the field on a view is timespan. " " " value value And indentation is also missing completely. Maybe you need to use another NN to guess which language the fake code is in and autoformat it accordingly!
It is, the tokenizer isn't reversible (and it adds spaces all over the place). But a lot of these I should be able to add to my regex that converts the output back into more human readable format (in the raw output, there's a space before every punctuation mark so I already remove those extraneous spaces from periods, commas, etc). I just haven't gotten around to adding in any heuristics specifically for code but add…
Re: Show HN: This Question Does Not Exist
#143I think it would still be considered a "Does Not Exist"-valid website if the generated questions would have some auto-formatter for the code. Main issue I see is extra spaces everywhere, often in a syntax breaking way (and missing spaces for formatting) (not that all SO questions have those).
Yeah this is a shortcoming of the tokenizer. It splits things up in ways that are not 1:1 mappable back to their source unfortunately. I did a bit of post-processing to get it formatted a bit better (re-combining the “would“ and “n’t” tokens and changing html tags to markdown for example) but there’s still room for improvement. Spacing specifically is different based on the context. Outside of code blocks you want a…