forked from simon-weber/Programming-Language-Identification
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
executable file
·30 lines (16 loc) · 811 Bytes
/
README
File metadata and controls
executable file
·30 lines (16 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Code copyright (c) 2011 David Klein and Simon Weber
Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
To add a folder source code to the database:
./addToDatabase.sh
Note that you have to edit the shell script if you want to add code from a language that's not already in the shell script.
To add code manually to the database:
python reader.py -l language < myfile
Where language is the language that the file is written in and myfile is the name of the source code file.
To attempt to identify the language of a piece of source code:
python identifylanguage.py < source_code_file
i.e.
python identifylanguage.py < sample.c
You can also type:
python identifylanguage.py -v < source_code_file
This gives you verbose output.
Code intended for Python 2.7.2 on linux.