MCPcopy Create free account

hub / github.com/Aunsiels/pyformlang / functions

Functions945 in github.com/Aunsiels/pyformlang

↓ 5 callersMethodis_normal_form
Tells is the current grammar is in Chomsky Normal Form or not Returns ------- is_normal_form : bool If t
pyformlang/cfg/cfg.py:1098
↓ 5 callersMethodminimize
Minimize the current DFA Returns ---------- dfa : :class:`~pyformlang.deterministic_finite_automaton\ .Deterministi
pyformlang/finite_automaton/deterministic_finite_automaton.py:302
↓ 5 callersMethodremove_final_state
Remove a final state Parameters ----------- state : :class:`~pyformlang.finite_automaton.State` A final state to
pyformlang/finite_automaton/finite_automaton.py:281
↓ 5 callersMethodremove_useless_symbols
Removes useless symbols in a CFG Returns ---------- new_cfg : :class:`~pyformlang.cfg.CFG` The CFG without usele
pyformlang/cfg/cfg.py:222
↓ 5 callersMethodsubstitute
Substitutes CFG to terminals in the current CFG Parameters ----------- substitution : dict of :class:`~pyformlang.cfg.Termin
pyformlang/cfg/cfg.py:478
↓ 5 callersFunctionto_node
Transforms a given value into a node
pyformlang/regular_expression/regex_objects.py:66
↓ 4 callersMethod_add_transitions_to
(self, union_fst, state_renaming, idx)
pyformlang/fst/fst.py:355
↓ 4 callersMethod_get_state_index
Get the state index
pyformlang/pda/cfg_variable_converter.py:27
↓ 4 callersMethod_perform_tests_example0
Tests for DFA from example 0
pyformlang/finite_automaton/tests/test_deterministic_finite_automaton.py:84
↓ 4 callersMethod_process_to_enfa_son
(self, s_from, s_to, index_son)
pyformlang/regular_expression/regex.py:250
↓ 4 callersMethodadd_final_state
Adds a final state to the automaton Parameters ---------- state : :class:`~pyformlang.pda.State` The state to ad
pyformlang/pda/pda.py:130
↓ 4 callersFunctioncombine_state_pair
Combine two states
pyformlang/finite_automaton/epsilon_nfa.py:975
↓ 4 callersMethodfrom_text
Construct a feature structure from a text. Parameters ----------- text : str The text to parse structure
pyformlang/fcfg/feature_structure.py:245
↓ 4 callersMethodget_first_set
Used in LL(1)
pyformlang/cfg/llone_parser.py:25
↓ 4 callersMethodget_leftmost_derivation
Get the leftmost derivation Returns ------- derivation : list of list of :class:`~pyformlang.cfg.CFGObject`
pyformlang/cfg/parse_tree.py:19
↓ 4 callersMethodget_llone_parsing_table
Get the LL(1) parsing table From: https://www.slideshare.net/MahbuburRahman273/ll1-parser-in-compilers
pyformlang/cfg/llone_parser.py:141
↓ 4 callersMethodget_rightmost_derivation
Get the leftmost derivation Returns ------- derivation : list of list of :class:`~pyformlang.cfg.CFGObject`
pyformlang/cfg/parse_tree.py:49
↓ 4 callersMethodintersection
Gets the intersection of the language L generated by the \ current PDA when accepting by final state with something else Currently,
pyformlang/pda/pda.py:443
↓ 4 callersMethodis_acyclic
Checks if the automaton is acyclic Returns ------- is_acyclic : bool Whether the automaton is acyclic or
pyformlang/finite_automaton/finite_automaton.py:425
↓ 4 callersMethodis_equivalent_to
Checks if the current automaton is equivalent to a given one. Parameters ---------- other : An other fin
pyformlang/finite_automaton/finite_automaton.py:568
↓ 4 callersMethodis_parsable
Whether a word is parsable or not Parameters ---------- word : list The word to parse left
pyformlang/cfg/recursive_decent_parser.py:103
↓ 4 callersFunctionis_special_text
Check if the input is given an explicit type
pyformlang/cfg/cfg.py:34
↓ 4 callersMethodreverse
The reverser ordering, simply reverse the order. Returns ---------- new_rules : iterable of \ :class:`~pyformlang.ind
pyformlang/indexed_grammar/rule_ordering.py:33
↓ 4 callersMethodto_pda_combined_state
To PDA state in the intersection function
pyformlang/pda/pda.py:684
↓ 4 callersFunctionto_single_state
Merge a list of states Parameters ---------- l_states : list of :class:`~pyformlang.finite_automaton.State` A list of states
pyformlang/finite_automaton/epsilon_nfa.py:952
↓ 3 callersMethod_assertions_test_copy
(self, fs1_copy)
pyformlang/fcfg/tests/test_feature_structure.py:181
↓ 3 callersFunction_get_agreement_subject_number_person
()
pyformlang/fcfg/tests/test_feature_structure.py:7
↓ 3 callersMethod_get_graph
Get the graph of the non-terminals in the rules. If there there is a link between A and B (oriented), it means that modifying A may m
pyformlang/indexed_grammar/rule_ordering.py:44
↓ 3 callersFunction_get_object_from_known
(given, obj_converter)
pyformlang/pda/utils.py:45
↓ 3 callersFunction_get_object_from_raw
(given, obj_converter, to_type)
pyformlang/pda/utils.py:52
↓ 3 callersMethod_process_sub_regex
(self, idx_from, idx_to)
pyformlang/regular_expression/regex_reader.py:168
↓ 3 callersMethod_recombine
(regex_to_recombine)
pyformlang/regular_expression/python_regex.py:172
↓ 3 callersMethod_remove_useless_extreme_parenthesis_from_components
(self)
pyformlang/regular_expression/regex_reader.py:34
↓ 3 callersMethod_set_end_first_group_in_components
Gives the end of the first group
pyformlang/regular_expression/regex_reader.py:114
↓ 3 callersMethodadd_class
Adds a new class
pyformlang/finite_automaton/partition.py:18
↓ 3 callersMethodadd_states
Add states Parameters ---------- states : list of str The states to add idx : int The
pyformlang/fst/fst.py:579
↓ 3 callersMethodget_box_by_nonterminal
Box by nonterminal Parameters ---------- nonterminal: :class:`~pyformlang.finite_automaton.Symbol` | str
pyformlang/rsa/recursive_automaton.py:39
↓ 3 callersMethodget_complement
Get the complement of the current Epsilon NFA Equivalent to: >>> -automaton Returns ---------- enfa : :c
pyformlang/finite_automaton/epsilon_nfa.py:505
↓ 3 callersFunctionget_example0
Gives a dfa
pyformlang/finite_automaton/tests/test_deterministic_finite_automaton.py:306
↓ 3 callersMethodget_follow_set
Get follow set
pyformlang/cfg/llone_parser.py:90
↓ 3 callersMethodget_generating_non_terminals
Get the generating symbols Returns ---------- generating : set of any The generating symbols from the start stat
pyformlang/indexed_grammar/indexed_grammar.py:222
↓ 3 callersMethodget_parse_tree
Give the parse tree associated with this CYK Table Returns ------- parse_tree : :class:`~pyformlang.cfg.ParseTree`
pyformlang/cfg/cyk_table.py:93
↓ 3 callersFunctionget_productions_d
Get productions as a dictionary
pyformlang/cfg/utils_cfg.py:39
↓ 3 callersMethodget_reachable_non_terminals
Get the reachable symbols Returns ---------- reachables : set of any The reachable symbols from the start state
pyformlang/indexed_grammar/indexed_grammar.py:178
↓ 3 callersMethodget_reachable_symbols
Gives the objects which are reachable in the CFG Returns ---------- reachable_symbols : set of :class:`~pyformlang.cfg.CFGOb
pyformlang/cfg/cfg.py:197
↓ 3 callersMethodget_symbol_from
Get a symbol
pyformlang/cfg/pda_object_creator.py:19
↓ 3 callersMethodget_transitions_from
Gets transitions from the given state
pyformlang/finite_automaton/transition_function.py:202
↓ 3 callersMethodget_unit_pairs
Finds all the unit pairs Returns ---------- unit_pairs : set of tuple of :class:`~pyformlang.cfg.Variable` The u
pyformlang/cfg/cfg.py:274
↓ 3 callersMethodis_deterministic
Checks whether an automaton is deterministic Returns ---------- is_deterministic : bool Whether the automaton is
pyformlang/finite_automaton/nondeterministic_finite_automaton.py:94
↓ 3 callersMethodis_finite
Tests if the grammar is finite or not Returns ---------- is_finite : bool Whether the grammar is finite or not
pyformlang/cfg/cfg.py:991
↓ 3 callersMethodremove_transition
Removes a transition to the function Parameters ---------- s_from : :class:`~pyformlang.finite_automaton.State`
pyformlang/finite_automaton/nondeterministic_transition_function.py:66
↓ 3 callersMethodreverse
Reverse the current CFG Equivalent to: >> ~cfg Returns ---------- new_cfg : :class:`~pyformlang.cfg.CFG
pyformlang/cfg/cfg.py:662
↓ 3 callersMethodto_networkx
Transform the current pda into a networkx graph Returns ------- graph : networkx.MultiDiGraph A network
pyformlang/pda/pda.py:567
↓ 3 callersMethodto_networkx
Transform the current automaton into a networkx graph Returns ------- graph : networkx.MultiDiGraph A n
pyformlang/finite_automaton/finite_automaton.py:462
↓ 2 callersMethod__try_add
Tries to add a given element to the given set. Returns True if element was added, otherwise False.
pyformlang/finite_automaton/finite_automaton.py:722
↓ 2 callersMethod_add_extremity_states_to
(self, union_fst, state_renaming, idx)
pyformlang/fst/fst.py:365
↓ 2 callersMethod_add_final_states_to
(self, union_fst, state_renaming, idx)
pyformlang/fst/fst.py:369
↓ 2 callersMethod_add_parenthesis_around_part_of_componants
(self, index_opening, index_closing)
pyformlang/regular_expression/regex_reader.py:82
↓ 2 callersMethod_add_start_states_to
(self, union_fst, state_renaming, idx)
pyformlang/fst/fst.py:373
↓ 2 callersFunction_completer
(state, chart, processed)
pyformlang/fcfg/fcfg.py:202
↓ 2 callersMethod_copy_into
(self, union_fst, state_renaming, idx)
pyformlang/fst/fst.py:351
↓ 2 callersMethod_create_new_variable
(self, i_stack_symbol, i_state0,
pyformlang/pda/cfg_variable_converter.py:63
↓ 2 callersMethod_create_or_transitions
Creates a OR transition instead of several connections CAREFUL: This method modifies the automaton and is designed for \ internal us
pyformlang/finite_automaton/epsilon_nfa.py:873
↓ 2 callersMethod_create_union_branch_in_enfa
(self, s_from, s_to, son_number)
pyformlang/regular_expression/regex.py:233
↓ 2 callersFunction_find_closing_bracket
(condition, start, opening="[", closing="]")
pyformlang/fcfg/feature_structure.py:267
↓ 2 callersFunction_find_first_complete_closing_if_possible
(parenthesis_depths, index_from=0)
pyformlang/regular_expression/regex_reader.py:195
↓ 2 callersMethod_find_repeated_sequence
(regex_list)
pyformlang/regular_expression/python_regex.py:325
↓ 2 callersMethod_get_final_state
(self, word: Iterable[Terminal])
pyformlang/fcfg/fcfg.py:114
↓ 2 callersMethod_get_first_set_production
(production, first_set)
pyformlang/cfg/llone_parser.py:49
↓ 2 callersMethod_get_generating_or_nullable
Merge of nullable and generating
pyformlang/cfg/cfg.py:107
↓ 2 callersMethod_get_indexes
(self, stack_symbol, state0, state1)
pyformlang/pda/cfg_variable_converter.py:99
↓ 2 callersMethod_get_next_states_from
Gets a set of states that are next to the given one
pyformlang/finite_automaton/finite_automaton.py:670
↓ 2 callersMethod_get_next_states_iterable
Gives the set of next states, starting from a set of states Parameters ---------- current_states : iterable of \ :cl
pyformlang/finite_automaton/epsilon_nfa.py:96
↓ 2 callersMethod_get_parenthesis_depths
(self)
pyformlang/regular_expression/regex_reader.py:55
↓ 2 callersMethod_get_regex_simple
Get the regex of an automaton when it only composed of a start and a final state CAUTION: For internal use only! Returns
pyformlang/finite_automaton/epsilon_nfa.py:438
↓ 2 callersMethod_get_state_renaming
(self, other_fst)
pyformlang/fst/fst.py:424
↓ 2 callersMethod_get_symbol_index
Get the symbol index
pyformlang/pda/cfg_variable_converter.py:40
↓ 2 callersMethod_initialize_enfa
(self)
pyformlang/regular_expression/regex.py:96
↓ 2 callersMethod_make_test_fst_union
(self, fst_union)
pyformlang/fst/tests/test_fst.py:132
↓ 2 callersMethod_perform_tests_digits
(self, should_copy=False)
pyformlang/finite_automaton/tests/test_epsilon_nfa.py:50
↓ 2 callersMethod_preprocess_brackets_content
(self, bracket_content)
pyformlang/regular_expression/python_regex.py:220
↓ 2 callersMethod_process_to_enfa
Internal function to add a regex to a given epsilon NFA. Parameters ---------- s_from : :class:`~pyformlang.finite_a
pyformlang/regular_expression/regex.py:179
↓ 2 callersMethod_remove_all_basic_states
Remove all states which are not the start state or a final state CAREFUL: This method modifies the current automaton, for internal usage
pyformlang/finite_automaton/epsilon_nfa.py:787
↓ 2 callersMethod_set_impacts_and_remaining_lists
(self)
pyformlang/cfg/cfg.py:142
↓ 2 callersFunction_split_text_conditions
(head_text)
pyformlang/fcfg/fcfg.py:182
↓ 2 callersMethod_sub_tests_contains1
(self, fcfg)
pyformlang/fcfg/tests/test_fcfg.py:151
↓ 2 callersMethod_to_deterministic_internal
Transforms the epsilon-nfa into a dfa Parameters ---------- eclose : bool Whether to use the epsilon closure or
pyformlang/finite_automaton/epsilon_nfa.py:283
↓ 2 callersMethodadd_content_path
Add content to the current feature structure at a specific path Parameters ---------- content_name : str The nam
pyformlang/fcfg/feature_structure.py:103
↓ 2 callersFunctionadd_start_state_to_graph
Adds a starting node to a given graph
pyformlang/finite_automaton/finite_automaton.py:762
↓ 2 callersMethodadd_transitions
Adds several transitions to the FST Parameters ---------- transitions_list : list of tuples The tuples h
pyformlang/fst/fst.py:125
↓ 2 callersMethodconcatenate
Makes the concatenation of two CFGs Equivalent to: >> cfg0 + cfg1 Parameters ---------- other : :class:`~
pyformlang/cfg/cfg.py:580
↓ 2 callersMethodeliminate_unit_productions
Eliminate all the unit production in the CFG Returns ---------- new_cfg : :class:`~pyformlang.cfg.CFG` A new CFG
pyformlang/cfg/cfg.py:299
↓ 2 callersFunctionexists
exists Check whether at least an element x of l is True for f(x) :param list_elements: A list of elements to test :param check_function: T
pyformlang/indexed_grammar/indexed_grammar.py:383
↓ 2 callersMethodfrom_ebnf
Create a recursive automaton from ebnf (ebnf = Extended Backus-Naur Form) Parameters ----------- text : str The
pyformlang/rsa/recursive_automaton.py:118
↓ 2 callersMethodgenerate_word
Checks is the word is generated Returns ------- is_generated : bool
pyformlang/cfg/cyk_table.py:76
↓ 2 callersMethodgenerator
Generates a collection of all the states at a given position
pyformlang/fcfg/state.py:57
↓ 2 callersMethodget_all_paths
Get the list of all path in the feature structure Returns -------- paths : Iterable of :class:`~pyformlang.fcfg.FeatureStruc
pyformlang/fcfg/feature_structure.py:215
↓ 2 callersFunctionget_cyclic_enfa_example
ENFA example with a cycle on the path to the final state
pyformlang/finite_automaton/tests/test_epsilon_nfa.py:807
↓ 2 callersFunctionget_dfa_example
An example of DFA
pyformlang/finite_automaton/tests/test_deterministic_finite_automaton.py:340
↓ 2 callersMethodget_difference
Compute the difference with another Epsilon NFA Equivalent to: >>> automaton0 - automaton1 Parameters ----------
pyformlang/finite_automaton/epsilon_nfa.py:640
← previousnext →101–200 of 945, ranked by callers