nlp - Source Code vs. Natural Language Detection -


are there existing tools detecting whether piece of text source code or natural language? not need identify programming language nor natural language. however, ideally flexible programming , natural language.

for example, piece of text identified source code:

def fib(n):     a, b = 0, 1     while < n:         print(a, end=' ')         a, b = b, a+b     print() 

and piece of text identified natural language:

hello! natural language. 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -