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

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -