Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Aunsiels/pyformlang
/ functions
Functions
945 in github.com/Aunsiels/pyformlang
⨍
Functions
945
◇
Types & classes
98
↓ 250 callers
Method
append
Append an element
pyformlang/cfg/set_queue.py:11
↓ 170 callers
Method
accepts
Check if a word matches (completely) the regex. Parameters ---------- word : iterable of str The word to
pyformlang/regular_expression/regex.py:522
↓ 157 callers
Method
accepts
Checks whether the epsilon nfa accepts a given word Parameters ---------- word : iterable of :class:`~pyformlang.finite_auto
pyformlang/finite_automaton/epsilon_nfa.py:122
↓ 143 callers
Method
add_transition
Adds a transition to the nfa Parameters ---------- s_from : :class:`~pyformlang.finite_automaton.State` The sour
pyformlang/finite_automaton/finite_automaton.py:47
↓ 101 callers
Method
_test_compare
(self, regex, s_test)
pyformlang/regular_expression/tests/test_python_regex.py:199
↓ 90 callers
Method
contains
Gives the membership of a word to the grammar Parameters ---------- word : iterable of :class:`~pyformlang.cfg.Terminal`
pyformlang/cfg/cfg.py:712
↓ 88 callers
Method
add
Add a state to the processed states. Returns if the insertion was successful or not.
pyformlang/fcfg/state.py:46
↓ 73 callers
Method
add_final_state
Adds a new final state Parameters ----------- state : :class:`~pyformlang.finite_automaton.State` A new final st
pyformlang/finite_automaton/finite_automaton.py:253
↓ 69 callers
Method
add_content
Add content to the current feature structure. Parameters ---------- content_name : str The name of the new featu
pyformlang/fcfg/feature_structure.py:84
↓ 69 callers
Method
append
Appends an element
pyformlang/finite_automaton/doubly_linked_list.py:15
↓ 65 callers
Method
get
Internal
pyformlang/finite_automaton/deterministic_finite_automaton.py:44
↓ 57 callers
Method
add_transition
Add a transition to the PDA Parameters ---------- s_from : :class:`~pyformlang.pda.State` The starting symbol
pyformlang/pda/pda.py:216
↓ 43 callers
Method
to_epsilon_nfa
Transforms the regular expression into an epsilon NFA. Returns ---------- enfa : :class:`~pyformlang.finite_automato
pyformlang/regular_expression/regex.py:143
↓ 42 callers
Method
add_start_state
Set an initial state Parameters ----------- state : :class:`~pyformlang.finite_automaton.State` The new initial
pyformlang/finite_automaton/finite_automaton.py:197
↓ 30 callers
Method
add
Internal
pyformlang/finite_automaton/deterministic_finite_automaton.py:35
↓ 30 callers
Method
from_text
Read a context free grammar from a text. The text contains one rule per line. The structure of a production is: head
pyformlang/cfg/cfg.py:1028
↓ 27 callers
Method
get_feature_by_path
Get a feature at a given path. Parameters ----------- path : Iterable of str, optional The path to the new featu
pyformlang/fcfg/feature_structure.py:129
↓ 27 callers
Method
subsumes
Check whether the current feature structure subsumes another one. Parameters ---------- other : :class:`~pyformlang.fcfg.Feat
pyformlang/fcfg/feature_structure.py:191
↓ 25 callers
Method
translate
Translate a string into another using the FST Parameters ---------- input_word : iterable of any The word to tra
pyformlang/fst/fst.py:164
↓ 23 callers
Method
is_empty
Says whether the CFG is empty or not Returns ---------- is_empty : bool Whether the CFG is empty or not
pyformlang/cfg/cfg.py:692
↓ 19 callers
Method
add_transition
Add a transition to the FST Parameters ----------- s_from : any The source state input_symbol : any
pyformlang/fst/fst.py:95
↓ 19 callers
Method
add_transition
Adds a new transition to the function Parameters ---------- s_from : :class:`~pyformlang.finite_automaton.State`
pyformlang/finite_automaton/nondeterministic_transition_function.py:30
↓ 18 callers
Method
add_start_state
Set an initial state Parameters ----------- state : :class:`~pyformlang.finite_automaton.State` The new initial
pyformlang/finite_automaton/deterministic_finite_automaton.py:121
↓ 18 callers
Method
is_empty
Checks whether the grammar generates a word or not Returns ---------- is_empty : bool Whether the grammar is empt
pyformlang/indexed_grammar/indexed_grammar.py:145
↓ 18 callers
Function
to_state
Transforms the input into a state Parameters ---------- given : any What we want to transform
pyformlang/finite_automaton/finite_automaton.py:732
↓ 17 callers
Function
to_symbol
Transforms the input into a symbol Parameters ---------- given : any What we want to transform
pyformlang/finite_automaton/finite_automaton.py:747
↓ 17 callers
Method
union
Makes the union of two CFGs Equivalent to: >> cfg0 or cfg1 Parameters ---------- other : :class:`~pyforml
pyformlang/cfg/cfg.py:537
↓ 16 callers
Method
add_transitions
Adds several transitions to the automaton Parameters ---------- transitions_list : list of triples of (s_from, symb_
pyformlang/finite_automaton/finite_automaton.py:88
↓ 15 callers
Method
_should_escape_next_symbol
(regex_temp)
pyformlang/regular_expression/python_regex.py:386
↓ 15 callers
Method
add_transition
Adds a new transition to the function Parameters ---------- s_from : :class:`~pyformlang.finite_automaton.State`
pyformlang/finite_automaton/transition_function.py:41
↓ 15 callers
Method
copy
Copies the current Epsilon NFA Returns ---------- enfa : :class:`~pyformlang.finite_automaton.EpsilonNFA` A copy
pyformlang/finite_automaton/epsilon_nfa.py:360
↓ 15 callers
Method
to_cfg
Turns the language L generated by this PDA when accepting \ on empty \ stack into a CFG that accepts the same language L Ret
pyformlang/pda/pda.py:330
↓ 14 callers
Method
get_number_symbols
Gives the number of symbols in the regex. Returns ---------- n_symbols : int The number of symbols in th
pyformlang/regular_expression/regex.py:99
↓ 14 callers
Method
pop
Pop an element
pyformlang/cfg/set_queue.py:17
↓ 13 callers
Method
accepts
Checks whether the nfa accepts a given word Parameters ---------- word : iterable of :class:`~pyformlang.finite_automaton.Sy
pyformlang/finite_automaton/nondeterministic_finite_automaton.py:63
↓ 13 callers
Method
add_start_state
Add a start state Parameters ---------- start_state : any The start state
pyformlang/fst/fst.py:142
↓ 13 callers
Method
add_transition
(self, s_from: Any, symb_by: Any, s_to: A
pyformlang/finite_automaton/nondeterministic_finite_automaton.py:139
↓ 13 callers
Method
get_accepted_words
Gets words accepted by the finite automaton.
pyformlang/finite_automaton/finite_automaton.py:598
↓ 13 callers
Method
get_number_operators
Gives the number of operators in the regex. Returns ---------- n_operators : int The number of operators
pyformlang/regular_expression/regex.py:121
↓ 13 callers
Method
split
Splits
pyformlang/finite_automaton/partition.py:42
↓ 13 callers
Method
to_empty_stack
Turns the current PDA that accepts a language L by final state to \ another PDA that accepts the same language L by empty stack Retu
pyformlang/pda/pda.py:292
↓ 12 callers
Method
add_final_state
Add a final state Parameters ---------- final_state : any The final state to add
pyformlang/fst/fst.py:153
↓ 12 callers
Method
intersection
Gives the intersection of the current CFG with an other object Equivalent to: >> cfg and regex Parameters -------
pyformlang/cfg/cfg.py:791
↓ 12 callers
Method
is_final_state
Checks if a state is final Parameters ----------- state : :class:`~pyformlang.finite_automaton.State` The state
pyformlang/finite_automaton/finite_automaton.py:342
↓ 12 callers
Method
minimize
Minimize the current epsilon NFA Returns ---------- dfa : :class:`~pyformlang.deterministic_finite_automaton\ .Deter
pyformlang/finite_automaton/epsilon_nfa.py:849
↓ 11 callers
Method
pop
Pop an element
pyformlang/finite_automaton/hopcroft_processing_list.py:35
↓ 11 callers
Method
to_regex
Transforms the EpsilonNFA to a regular expression Returns ---------- regex : :class:`~pyformlang.regular_expression.Regex`
pyformlang/finite_automaton/epsilon_nfa.py:399
↓ 10 callers
Method
get_name
Get the renaming. Parameters ---------- state : str The state to rename idx : int Th
pyformlang/fst/fst.py:592
↓ 10 callers
Method
get_number_transitions
Gets the number of transitions in the PDA Returns ---------- n_transitions : int The number of transitions
pyformlang/pda/pda.py:193
↓ 10 callers
Method
get_number_transitions
Gives the number of transitions describe by the function Returns ---------- n_transitions : int The number of tr
pyformlang/finite_automaton/nondeterministic_transition_function.py:100
↓ 10 callers
Method
get_number_transitions
Gives the number of transitions Returns ---------- n_transitions : int The number of deterministic transitions
pyformlang/finite_automaton/finite_automaton.py:167
↓ 10 callers
Method
to_normal_form
Gets the Chomsky Normal Form of a CFG Returns ---------- new_cfg : :class:`~pyformlang.cfg.CFG` A new CFG equiva
pyformlang/cfg/cfg.py:387
↓ 10 callers
Method
unify
Unify the current structure with another one. Modifies the current structure. Parameters ---------- other : :class:`
pyformlang/fcfg/feature_structure.py:155
↓ 9 callers
Method
copy
Copy the current transition function Returns ---------- new_tf : :class:`~pyformlang.pda.TransitionFunction` The
pyformlang/pda/transition_function.py:58
↓ 9 callers
Method
eclose_iterable
Compute the epsilon closure of a collection of states Parameters ---------- states : iterable of :class:`~pyformlang.finite_
pyformlang/finite_automaton/epsilon_nfa.py:160
↓ 9 callers
Method
is_deterministic
Checks whether an automaton is deterministic Returns ---------- is_deterministic : bool Whether the automaton is
pyformlang/finite_automaton/epsilon_nfa.py:227
↓ 8 callers
Method
_add_epsilon_transition_in_enfa_between
(self, state0, state1)
pyformlang/regular_expression/regex.py:247
↓ 8 callers
Method
_get_next_state_enfa
(self)
pyformlang/regular_expression/regex.py:169
↓ 8 callers
Method
accepts
Checks whether the dfa accepts a given word Parameters ---------- word : iterable of :class:`~pyformlang.finite_automaton.Sy
pyformlang/finite_automaton/deterministic_finite_automaton.py:173
↓ 8 callers
Method
eclose
Compute the epsilon closure of a state Parameters ---------- state : :class:`~pyformlang.finite_automaton.State`
pyformlang/finite_automaton/epsilon_nfa.py:190
↓ 8 callers
Function
get_example_text_duplicate
Duplicate text
pyformlang/cfg/tests/test_cfg.py:916
↓ 8 callers
Method
insert
Insert new element
pyformlang/finite_automaton/hopcroft_processing_list.py:29
↓ 8 callers
Method
is_empty
Checks if the language represented by the FSM is empty or not Returns ---------- is_empty : bool Whether the lan
pyformlang/finite_automaton/epsilon_nfa.py:747
↓ 8 callers
Method
remove_start_state
remove an initial state Parameters ----------- state : :class:`~pyformlang.finite_automaton.State` The new initi
pyformlang/finite_automaton/finite_automaton.py:224
↓ 8 callers
Method
to_deterministic
Transforms the epsilon-nfa into a dfa Returns ---------- dfa : :class:`~pyformlang.finite_automaton\ .Deterministic
pyformlang/finite_automaton/epsilon_nfa.py:333
↓ 8 callers
Method
to_regex
Tranforms the EpsilonNFA to a regular expression Returns ---------- regex : :class:`~pyformlang.regular_expression.Regex`
pyformlang/finite_automaton/regexable.py:11
↓ 8 callers
Method
union
Makes the union of two regexable objects Parameters ---------- other : :class:`~pyformlang.finite_automaton.Regexable`
pyformlang/finite_automaton/regexable.py:21
↓ 7 callers
Method
copy
Copies the current feature structure Parameters ---------- already_copied : dict A dictionary containing the par
pyformlang/fcfg/feature_structure.py:32
↓ 7 callers
Function
get_enfa_example0
Gives an example ENFA Accepts a*b
pyformlang/finite_automaton/tests/test_epsilon_nfa.py:694
↓ 7 callers
Method
get_number_transitions
Gives the number of transitions describe by the deterministic \ function Returns ---------- n_transitions : int
pyformlang/finite_automaton/transition_function.py:148
↓ 7 callers
Method
is_production
Whether the rule is a production rule or not Returns ---------- is_production : bool Whether the rule is a produc
pyformlang/indexed_grammar/reduced_rule.py:36
↓ 7 callers
Method
to_cfg
Turns the regex into a context-free grammar. Parameters ---------- starting_symbol : :class:`~pyformlang.cfg.Variabl
pyformlang/regular_expression/regex.py:286
↓ 7 callers
Method
to_cfg_combined_variable
Conversion used in the to_pda method
pyformlang/pda/cfg_variable_converter.py:53
↓ 7 callers
Method
to_final_state
Turns the current PDA that accepts a language L by empty stack \ to another PDA that accepts the same language L by final state Retu
pyformlang/pda/pda.py:257
↓ 7 callers
Method
to_pda
Converts the CFG to a PDA that generates on empty stack an \ equivalent language Returns ---------- new_pda : :class
pyformlang/cfg/cfg.py:753
↓ 7 callers
Method
to_state
Convert to a state
pyformlang/pda/utils.py:19
↓ 6 callers
Method
__init__
(self, value)
pyformlang/regular_expression/regex_objects.py:16
↓ 6 callers
Method
contains
Gives the membership of a word to the grammar Parameters ---------- word : iterable of :class:`~pyformlang.cfg.Terminal`
pyformlang/fcfg/fcfg.py:76
↓ 6 callers
Function
get_enfa_example1
Gives and example ENFA Accepts c
pyformlang/finite_automaton/tests/test_epsilon_nfa.py:712
↓ 6 callers
Function
get_next_free
Get free next state or symbol
pyformlang/pda/pda.py:694
↓ 6 callers
Method
get_nullable_symbols
Gives the objects which are nullable in the CFG Returns ---------- nullable_symbols : set of :class:`~pyformlang.cfg.CFGObje
pyformlang/cfg/cfg.py:244
↓ 6 callers
Method
get_number_transitions
Get the number of transitions in the FST Returns ---------- n_transitions : int The number of transitions
pyformlang/fst/fst.py:85
↓ 6 callers
Method
get_stack_symbol_from
Get a stack symbol
pyformlang/cfg/pda_object_creator.py:30
↓ 6 callers
Method
get_words
Get the words generated by the CFG Parameters ---------- max_length : int The maximum length of the words to ret
pyformlang/cfg/cfg.py:925
↓ 6 callers
Method
is_duplication
Whether the rule is a duplication rule or not Returns ---------- is_duplication : bool Whether the rule is a dupl
pyformlang/indexed_grammar/reduced_rule.py:26
↓ 6 callers
Method
remove_transition
Remove a transition of the nfa Parameters ---------- s_from : :class:`~pyformlang.finite_automaton.State` The so
pyformlang/finite_automaton/finite_automaton.py:122
↓ 6 callers
Method
to_fst
Turns the finite automaton into a finite state transducer The transducers accepts only the words in the language of the \ automaton
pyformlang/finite_automaton/finite_automaton.py:393
↓ 6 callers
Method
to_stack_symbol
Convert to a stack symbol
pyformlang/pda/utils.py:33
↓ 6 callers
Function
to_terminal
Transformation into a terminal
pyformlang/cfg/utils.py:14
↓ 6 callers
Method
to_text
Turns the grammar into its string representation. This might lose some\ type information and the start_symbol. Returns
pyformlang/cfg/cfg.py:1012
↓ 5 callers
Method
from_regex
Create a recursive automaton from regular expression Parameters ----------- regex : :class:`~pyformlang.regular_expression.R
pyformlang/rsa/recursive_automaton.py:98
↓ 5 callers
Method
generate_epsilon
Whether the grammar generates epsilon or not Returns ---------- generate_epsilon : bool Whether epsilon is gener
pyformlang/cfg/cfg.py:161
↓ 5 callers
Method
get_cnf_parse_tree
Get a parse tree of the CNF of this grammar Parameters ---------- word : iterable of :class:`~pyformlang.cfg.Termina
pyformlang/cfg/cfg.py:732
↓ 5 callers
Method
get_dereferenced
Get the dereferences version of the feature structure. For internal usage.
pyformlang/fcfg/feature_structure.py:125
↓ 5 callers
Method
get_edges
Gets the edges Returns ---------- edges : generator of (:class:`~pyformlang.finite_automaton.State`, \ :class:`~
pyformlang/finite_automaton/transition_function.py:168
↓ 5 callers
Method
get_generating_symbols
Gives the objects which are generating in the CFG Returns ---------- generating_symbols : set of :class:`~pyformlang.cfg.CFG
pyformlang/cfg/cfg.py:95
↓ 5 callers
Method
get_llone_parse_tree
Get LL(1) parse Tree Parameters ---------- word : list The word to parse Returns ------
pyformlang/cfg/llone_parser.py:193
↓ 5 callers
Method
intersection
Compute the intersection with an other object Equivalent to: >> fst and indexed_grammar
pyformlang/fst/fst.py:209
↓ 5 callers
Method
is_end_rule
Whether the rule is an end rule or not Returns ---------- is_end : bool Whether the rule is an end rule or not
pyformlang/indexed_grammar/end_rule.py:34
↓ 5 callers
Method
is_incomplete
Check if a state is incomplete
pyformlang/fcfg/state.py:27
next →
1–100 of 945, ranked by callers