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
Post a Comment