4 ms·
sure, primarily code. except when code contains language, like in comments, and other related documentation that's stored in-repo. and of course, people are g
by beachstartup 11y ago
sure, primarily code. except when code contains language, like in comments, and other related documentation that's stored in-repo. and of course, people are going to completely mis-use the repo to store ancillary human-readable binary documents, which will need to be converted, indexed, searched, updated, purged, etc, etc...
since developers tag, reference, and document their code with comments, they're going to expect the full suite of NLP treatments with all indexed content, including code.
which basically means: you'll have to tokenize out the special characterize for NLP, but retain them for literal code searches, thereby increasing the size of the inverted index for every permutation of the desired search criteria.
maybe you can detect and filter out all the comments, and index them separately, or maybe have some kind of dual system where the NL indexing system exists separately from the code indexing system ... you see where this is going?
- bazzargh 11y agothey're going to expect the full suite of NLP treatments with all indexed content, including code. Nope. In 30 years of searching through code, I've never once felt the need for that. On the other hand, almost every time I use Github search, I find the limitations of a word-oriented index get in the way (looking for partial keywords to find code relevant to an api, etc. It's not just special characters).