<commit_before>:- module('universal-transpiler', [translate/3,translate/4]).
:- set_prolog_flag(double_quotes,chars).
% This is a program that translates several programming languages into several other languages.

% Edit this list to specify the languages that should be translated. Each language should be written in lowercase:
list_of_langs(X) :-
	%X = ['javascript','c#',ruby,'java',c,'c++','go','php','swift','octave','lua','java','pydatalog',prolog,'constraint handling rules',perl,'haxe'].
	X = ['ruby','javascript','python','php','c#','java','haxe','lua','constraint handling rules','prolog','perl'].

translate(Input_,Lang2,Output) :-
	atom_chars(Input_,Input), list_of_langs(X),member(Lang1,X),translate(Input,Lang1,Lang2,Output_), atom_chars(Output,Output_).
translate(Input,Lang1,Lang2,Output) :-
	parse(Lang1,Lang2,true,Input,Ls),
	parse(Lang2,Lang1,false,Output,Ls).

namespace(Data,Data1,Name1,Indent) :-
	Data = [Lang,Is_input,Namespace,Var_types,Indent,Lang2],
	Data1 = [Lang,Is_input,[Name1|Namespace],Var_types,indent(Indent),Lang2].

offside_rule_langs(X) :-
	X = ['python','cython','coffeescript','cosmos','cobra'].<commit_msg>fixed again<commit_after>:- module('transpiler', [translate/3,translate/4]).
:- set_prolog_flag(double_quotes,chars).
% This is a program that translates several programming languages into several other languages.

% Edit this list to specify the languages that should be translated. Each language should be written in lowercase:
list_of_langs(X) :-
	%X = ['javascript','c#',ruby,'java',c,'c++','go','php','swift','octave','lua','java','pydatalog',prolog,'constraint handling rules',perl,'haxe'].
	X = ['ruby','javascript','python','php','c#','java','haxe','lua','constraint handling rules','prolog','perl'].

translate(Input_,Lang2,Output) :-
	atom_chars(Input_,Input), list_of_langs(X),member(Lang1,X),translate(Input,Lang1,Lang2,Output_), atom_chars(Output,Output_).
translate(Input,Lang1,Lang2,Output) :-
	parse(Lang1,Lang2,true,Input,Ls),
	parse(Lang2,Lang1,false,Output,Ls).

namespace(Data,Data1,Name1,Indent) :-
	Data = [Lang,Is_input,Namespace,Var_types,Indent,Lang2],
	Data1 = [Lang,Is_input,[Name1|Namespace],Var_types,indent(Indent),Lang2].

offside_rule_langs(X) :-
	X = ['python','cython','coffeescript','cosmos','cobra'].
{'fraction_non_alphanumeric': 0.19133099824868652, 'fraction_numerical': 0.01576182136602452, 'mean_word_length': 10.03864734299517, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4186151', 'n_tokens_mistral': 799, 'n_tokens_neox': 775, 'n_words': 118}