MCPcopy Create free account

hub / github.com/FSoft-AI4Code/CodeText-parser / functions

Functions249 in github.com/FSoft-AI4Code/CodeText-parser

↓ 68 callersFunctionget_node_text
Get text of a tree-sitter Node. Can be use to replace `match_from_span`. Args: root (tree_sitter.Node): Tree sitter node to get
src/codetext/parser/language_parser.py:143
↓ 47 callersFunctionget_node_by_kind
Get all nodes with specific type Args: root (tree_sitter.Node): Tree sitter root node kind (List[str]): (node's) type th
src/codetext/parser/language_parser.py:123
↓ 44 callersMethodget_function_list
(node)
src/codetext/parser/go_parser.py:91
↓ 34 callersFunctionparse_code
Auto parse raw code into `tree_sitter.Tree` Args: raw_code (str): Raw source code need to parse language (str): Language
src/codetext/utils/utils.py:71
↓ 24 callersMethodget_function_metadata
(function_node, blob: str=None)
src/codetext/parser/go_parser.py:96
↓ 19 callersMethodget_class_list
(node)
src/codetext/parser/go_parser.py:126
↓ 16 callersMethodget_docstring
Get docstring description for node Args: node (tree_sitter.Node) blob (str): original source code wh
src/codetext/parser/go_parser.py:74
↓ 13 callersMethodget_class_metadata
(class_node, blob=None)
src/codetext/parser/go_parser.py:130
↓ 10 callersMethodsearch
(query, options = {})
tests/test_parser/test_sample/ruby_test_sample.rb:20
↓ 3 callersFunctionbuild_language
Build tree-sitter language Args: language (str): java, python, cpp, c_sharp, etc save_path (str): save path (default cre
src/codetext/utils/utils.py:21
↓ 3 callersFunctionnodes_are_equal
(n1, n2)
src/codetext/parser/language_parser.py:32
↓ 3 callersFunctiontokenize_docstring
(docstring: str)
src/codetext/parser/language_parser.py:20
↓ 2 callersFunctiondoes_str_containt_math
(str)
src/codetext/clean/noise_removal.py:500
↓ 2 callersMethodget_action_list
(action_node)
src/codetext/parser/ruby_parser.py:139
↓ 1 callersFunctionAppendPathSeparator
(string filepath)
tests/test_parser/test_sample/c_sharp_test_sample.cs:7
↓ 1 callersFunction_package_available
Check if a package is available in your environment. .. code-block:: python >>> _package_available('os') True >>> _pa
src/codetext/utils/imports.py:6
↓ 1 callersFunctioncamel_case_split
(identifier)
src/codetext/clean/noise_removal.py:696
↓ 1 callersFunctioncheck_docstring
Check docstring is valid or not
src/codetext/clean/noise_removal.py:762
↓ 1 callersFunctioncheck_docstring_length
(docstring: str)
src/codetext/clean/noise_removal.py:415
↓ 1 callersFunctioncheck_docstring_literal
Check if docstring is EN TODO: "Ce n'est pas en anglais" -> Fr
src/codetext/clean/noise_removal.py:423
↓ 1 callersFunctioncheck_is_black_node
Check if node belongs to black list. E.g: - Built-in function - Test function, test class - Constructor
src/codetext/clean/noise_removal.py:367
↓ 1 callersFunctioncheck_is_empty_function
If node width is longer than 3 lines, then it's not an empty function
src/codetext/clean/noise_removal.py:389
↓ 1 callersFunctioncheck_is_node_error
Check if node contains "ERROR" node Args: node (tree_sitter.Node): node Return: bool
src/codetext/clean/noise_removal.py:53
↓ 1 callersFunctionclean_docstring
Clean docstring by removing special tag/url, characters, unrelevant information
src/codetext/clean/noise_removal.py:841
↓ 1 callersMethodconstructDsn
* Constructs the Sqlsrv PDO DSN. * * @param mixed[] $params * @param string[] $connectionOptions * * @throws Exception
tests/test_parser/test_sample/php_test_sample.php:50
↓ 1 callersFunctionconvert_special_pattern
(docstring)
src/codetext/clean/noise_removal.py:524
↓ 1 callersMethodgetConnectionOptionsDsn
* Converts a connection options array to the DSN * * @param string[] $connectionOptions */
tests/test_parser/test_sample/php_test_sample.php:80
↓ 1 callersMethodgetHabitList
Gets HabitList instance. @param context instance of Context @param userIndex integer user index @return HabitList @see HabitList
tests/test_parser/test_sample/java_test_sample.java:23
↓ 1 callersMethodget_action_metadata
(action_node)
src/codetext/parser/ruby_parser.py:149
↓ 1 callersFunctionget_args
()
src/codetext/__main__.py:10
↓ 1 callersMethodget_comment_node
Return all comment node inside a parent node Args: node (tree_sitter.Node) Return: List: list of comm
src/codetext/parser/go_parser.py:15
↓ 1 callersMethodget_docstring_node
Get docstring node from it parent node. C# docstring is written line by line and stay outside it own node, see example below.
src/codetext/parser/c_sharp_parser.py:32
↓ 1 callersMethodget_docstring_node
Get docstring node from it parent node. Expect return list have length==1 Args: node (tree_sitter.Node): parent
src/codetext/parser/java_parser.py:18
↓ 1 callersMethodget_docstring_node
(node)
src/codetext/parser/python_parser.py:38
↓ 1 callersMethodget_docstring_node
Get docstring node from it parent node. Go's docstring is written line by line Args: node (tree_sitter.N
src/codetext/parser/go_parser.py:27
↓ 1 callersMethodget_docstring_node
(node)
src/codetext/parser/rust_parser.py:30
↓ 1 callersMethodget_docstring_node
(node)
src/codetext/parser/javascript_parser.py:17
↓ 1 callersMethodget_docstring_node
Get docstring node from it parent node. C and C++ share the same syntax. Their docstring usually is 1 single block Expect len
src/codetext/parser/cpp_parser.py:33
↓ 1 callersMethodget_docstring_node
(node)
src/codetext/parser/php_parser.py:35
↓ 1 callersMethodget_docstring_node
(node)
src/codetext/parser/ruby_parser.py:39
↓ 1 callersFunctionget_node_length
Get node length Args: node (tree_sitter.Node): node Return: int
src/codetext/clean/noise_removal.py:72
↓ 1 callersMethodhonk
tests/test_parser/test_sample/cpp_test_sample.cpp:16
↓ 1 callersFunctionmain
()
src/codetext/__main__.py:35
↓ 1 callersFunctionmatch_from_span
(node, blob: str)
src/codetext/parser/language_parser.py:159
↓ 1 callersFunctionnode_parent
(tree, node)
src/codetext/parser/language_parser.py:91
↓ 1 callersFunctionparse_file
(file_path: str, language: str = None, verbose: bool = False)
src/codetext/codetext_cli.py:10
↓ 1 callersFunctionpartition
Function to find the partition position :param array: the unsorted array :type array: List :param low: smaller pivot :type l
tests/test_parser/test_sample/py_test_sample.py:1
↓ 1 callersMethodpresent
* Dispatched when loading the repositories fails * * @param {object} error The error * * @return {object} An action object with
tests/test_parser/test_sample/javascript_test_sample.js:91
↓ 1 callersFunctionprint_result
(res: Dict, file_name: str = "no_name_file")
src/codetext/codetext_cli.py:80
↓ 1 callersMethodquack
(&self)
tests/test_parser/test_sample/rust_test_sample.rs:17
↓ 1 callersFunctionquickSort
Function to perform quicksort
tests/test_parser/test_sample/py_test_sample.py:37
↓ 1 callersFunctionremove_comment_delimiters
Remove comment delimiters. Example: //, /*, */, #, etc Args: docstring (str): raw (line or block) comment remove_whi
src/codetext/clean/noise_removal.py:89
↓ 1 callersFunctionremove_patterns_at_the_end_of_a_docstring
Remove ending character(s) This function applies at docstring-level
src/codetext/clean/noise_removal.py:297
↓ 1 callersFunctionremove_special_tag
Remove all special tag (html tag, e.g. <p>docstring</p>)
src/codetext/clean/noise_removal.py:117
↓ 1 callersFunctionremove_unrelevant
(docstring: str)
src/codetext/clean/noise_removal.py:335
↓ 1 callersFunctionreverseSentence
* A brief description. A more elaborate class description * @param random_seed somearg. * @see Test() * @return The test results */
tests/test_parser/test_sample/c_test_sample.c:10
↓ 1 callersFunctionsnake_case_split
(identifier)
src/codetext/clean/noise_removal.py:701
↓ 1 callersFunctionsplit_all_sepcial_case
(docstring: str)
src/codetext/clean/noise_removal.py:705
↓ 1 callersFunctionsplit_identifier_into_parts
Split a single identifier into parts on snake_case and camelCase
src/codetext/clean/noise_removal.py:42
↓ 1 callersFunctionsplit_sentences
(docstring)
src/codetext/clean/noise_removal.py:33
↓ 1 callersFunctiontraverse
(node, results: List)
src/codetext/parser/language_parser.py:103
↓ 1 callersFunctiontraverse_type
(node, results, kind:List)
src/codetext/parser/language_parser.py:113
MethodDog
Constructor Declaration of Class
tests/test_parser/test_sample/c_sharp_test_sample.cs:23
MethodError
The path package should only be used for paths separated by forward slashes, such as the paths in URLs. This package does not deal with Windows paths
tests/test_parser/test_sample/go_test_sample.go:13
FunctionGetText
(string path, string filename)
tests/test_parser/test_sample/c_sharp_test_sample.cs:1
MethodMain
Docstring of this function
tests/test_parser/test_sample/c_sharp_test_sample.cs:33
MethodSaveFileController
()
tests/test_parser/test_sample/java_test_sample.java:11
Method__init__
(self, name, age)
tests/test_parser/test_sample/py_test_sample.py:67
Functioncheck_autogenerated_by_code
(raw_code: str, identifier: str)
src/codetext/clean/noise_removal.py:398
Functioncheck_contain_little_alphabet_char
(docstring: str)
src/codetext/clean/noise_removal.py:512
Functioncheck_contain_little_unique_chars
This function applies on docstring line
src/codetext/clean/noise_removal.py:587
Functioncheck_contain_little_unique_words
(docstring)
src/codetext/clean/noise_removal.py:597
Functioncheck_contain_many_long_word
(docstring: str)
src/codetext/clean/noise_removal.py:715
Functioncheck_contain_many_special_char
(docstring: str)
src/codetext/clean/noise_removal.py:548
Functioncheck_contain_many_uppercase_word
(docstring: str)
src/codetext/clean/noise_removal.py:645
Functioncheck_contain_too_many_method_call
(docstring)
src/codetext/clean/noise_removal.py:684
Functioncheck_contain_too_many_variables
Check if the string contains too much sneak_case or camelCase
src/codetext/clean/noise_removal.py:662
Functioncheck_contain_url
(docstring: str)
src/codetext/clean/noise_removal.py:725
Functioncheck_docstring_autogenerated
(docstring: str)
src/codetext/clean/noise_removal.py:468
Functioncheck_docstring_contain_question
(docstring: str)
src/codetext/clean/noise_removal.py:447
Functioncheck_docstring_contain_specific_pattern
(docstring: str)
src/codetext/clean/noise_removal.py:485
Functioncheck_docstring_underdevelopment
(docstring: str)
src/codetext/clean/noise_removal.py:456
Functioncheck_function
Check function if - is built-in function (python) - is constructor - is empty - is error node - have len
src/codetext/clean/noise_removal.py:734
Methodconnect
* {@inheritdoc} * * @return Connection */
tests/test_parser/test_sample/php_test_sample.php:10
Methodconstructor
(brand, mod)
tests/test_parser/test_sample/javascript_test_sample.js:66
Methodconstructor
(brand)
tests/test_parser/test_sample/javascript_test_sample.js:80
Methodget_class_list
(node)
src/codetext/parser/language_parser.py:217
Methodget_class_list
(node)
src/codetext/parser/c_sharp_parser.py:103
Methodget_class_list
(node)
src/codetext/parser/java_parser.py:69
Methodget_class_list
(node)
src/codetext/parser/python_parser.py:33
Methodget_class_list
(node)
src/codetext/parser/rust_parser.py:25
Methodget_class_list
(node)
src/codetext/parser/javascript_parser.py:65
Methodget_class_list
(node)
src/codetext/parser/cpp_parser.py:86
Methodget_class_list
(node)
src/codetext/parser/php_parser.py:51
Methodget_class_list
(node)
src/codetext/parser/ruby_parser.py:28
Methodget_class_metadata
(class_node, blob=None)
src/codetext/parser/language_parser.py:232
Methodget_class_metadata
Class metadata contains: - identifier (str): class's name - parameters (List[str]): inheritance class
src/codetext/parser/c_sharp_parser.py:155
Methodget_class_metadata
(class_node, blob: str=None)
src/codetext/parser/java_parser.py:86
Methodget_class_metadata
(class_node, blob: str=None)
src/codetext/parser/python_parser.py:103
Methodget_class_metadata
(class_node, blob=None)
src/codetext/parser/rust_parser.py:121
next →1–100 of 249, ranked by callers