MCPcopy Create free account

hub / github.com/Aunsiels/pyformlang / functions

Functions945 in github.com/Aunsiels/pyformlang

↓ 250 callersMethodappend
Append an element
pyformlang/cfg/set_queue.py:11
↓ 170 callersMethodaccepts
Check if a word matches (completely) the regex. Parameters ---------- word : iterable of str The word to
pyformlang/regular_expression/regex.py:522
↓ 157 callersMethodaccepts
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 callersMethodadd_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 callersMethod_test_compare
(self, regex, s_test)
pyformlang/regular_expression/tests/test_python_regex.py:199
↓ 90 callersMethodcontains
Gives the membership of a word to the grammar Parameters ---------- word : iterable of :class:`~pyformlang.cfg.Terminal`
pyformlang/cfg/cfg.py:712
↓ 88 callersMethodadd
Add a state to the processed states. Returns if the insertion was successful or not.
pyformlang/fcfg/state.py:46
↓ 73 callersMethodadd_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 callersMethodadd_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 callersMethodappend
Appends an element
pyformlang/finite_automaton/doubly_linked_list.py:15
↓ 65 callersMethodget
Internal
pyformlang/finite_automaton/deterministic_finite_automaton.py:44
↓ 57 callersMethodadd_transition
Add a transition to the PDA Parameters ---------- s_from : :class:`~pyformlang.pda.State` The starting symbol
pyformlang/pda/pda.py:216
↓ 43 callersMethodto_epsilon_nfa
Transforms the regular expression into an epsilon NFA. Returns ---------- enfa : :class:`~pyformlang.finite_automato
pyformlang/regular_expression/regex.py:143
↓ 42 callersMethodadd_start_state
Set an initial state Parameters ----------- state : :class:`~pyformlang.finite_automaton.State` The new initial
pyformlang/finite_automaton/finite_automaton.py:197
↓ 30 callersMethodadd
Internal
pyformlang/finite_automaton/deterministic_finite_automaton.py:35
↓ 30 callersMethodfrom_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 callersMethodget_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 callersMethodsubsumes
Check whether the current feature structure subsumes another one. Parameters ---------- other : :class:`~pyformlang.fcfg.Feat
pyformlang/fcfg/feature_structure.py:191
↓ 25 callersMethodtranslate
Translate a string into another using the FST Parameters ---------- input_word : iterable of any The word to tra
pyformlang/fst/fst.py:164
↓ 23 callersMethodis_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 callersMethodadd_transition
Add a transition to the FST Parameters ----------- s_from : any The source state input_symbol : any
pyformlang/fst/fst.py:95
↓ 19 callersMethodadd_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 callersMethodadd_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 callersMethodis_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 callersFunctionto_state
Transforms the input into a state Parameters ---------- given : any What we want to transform
pyformlang/finite_automaton/finite_automaton.py:732
↓ 17 callersFunctionto_symbol
Transforms the input into a symbol Parameters ---------- given : any What we want to transform
pyformlang/finite_automaton/finite_automaton.py:747
↓ 17 callersMethodunion
Makes the union of two CFGs Equivalent to: >> cfg0 or cfg1 Parameters ---------- other : :class:`~pyforml
pyformlang/cfg/cfg.py:537
↓ 16 callersMethodadd_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 callersMethod_should_escape_next_symbol
(regex_temp)
pyformlang/regular_expression/python_regex.py:386
↓ 15 callersMethodadd_transition
Adds a new transition to the function Parameters ---------- s_from : :class:`~pyformlang.finite_automaton.State`
pyformlang/finite_automaton/transition_function.py:41
↓ 15 callersMethodcopy
Copies the current Epsilon NFA Returns ---------- enfa : :class:`~pyformlang.finite_automaton.EpsilonNFA` A copy
pyformlang/finite_automaton/epsilon_nfa.py:360
↓ 15 callersMethodto_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 callersMethodget_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 callersMethodpop
Pop an element
pyformlang/cfg/set_queue.py:17
↓ 13 callersMethodaccepts
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 callersMethodadd_start_state
Add a start state Parameters ---------- start_state : any The start state
pyformlang/fst/fst.py:142
↓ 13 callersMethodadd_transition
(self, s_from: Any, symb_by: Any, s_to: A
pyformlang/finite_automaton/nondeterministic_finite_automaton.py:139
↓ 13 callersMethodget_accepted_words
Gets words accepted by the finite automaton.
pyformlang/finite_automaton/finite_automaton.py:598
↓ 13 callersMethodget_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 callersMethodsplit
Splits
pyformlang/finite_automaton/partition.py:42
↓ 13 callersMethodto_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 callersMethodadd_final_state
Add a final state Parameters ---------- final_state : any The final state to add
pyformlang/fst/fst.py:153
↓ 12 callersMethodintersection
Gives the intersection of the current CFG with an other object Equivalent to: >> cfg and regex Parameters -------
pyformlang/cfg/cfg.py:791
↓ 12 callersMethodis_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 callersMethodminimize
Minimize the current epsilon NFA Returns ---------- dfa : :class:`~pyformlang.deterministic_finite_automaton\ .Deter
pyformlang/finite_automaton/epsilon_nfa.py:849
↓ 11 callersMethodpop
Pop an element
pyformlang/finite_automaton/hopcroft_processing_list.py:35
↓ 11 callersMethodto_regex
Transforms the EpsilonNFA to a regular expression Returns ---------- regex : :class:`~pyformlang.regular_expression.Regex`
pyformlang/finite_automaton/epsilon_nfa.py:399
↓ 10 callersMethodget_name
Get the renaming. Parameters ---------- state : str The state to rename idx : int Th
pyformlang/fst/fst.py:592
↓ 10 callersMethodget_number_transitions
Gets the number of transitions in the PDA Returns ---------- n_transitions : int The number of transitions
pyformlang/pda/pda.py:193
↓ 10 callersMethodget_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 callersMethodget_number_transitions
Gives the number of transitions Returns ---------- n_transitions : int The number of deterministic transitions
pyformlang/finite_automaton/finite_automaton.py:167
↓ 10 callersMethodto_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 callersMethodunify
Unify the current structure with another one. Modifies the current structure. Parameters ---------- other : :class:`
pyformlang/fcfg/feature_structure.py:155
↓ 9 callersMethodcopy
Copy the current transition function Returns ---------- new_tf : :class:`~pyformlang.pda.TransitionFunction` The
pyformlang/pda/transition_function.py:58
↓ 9 callersMethodeclose_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 callersMethodis_deterministic
Checks whether an automaton is deterministic Returns ---------- is_deterministic : bool Whether the automaton is
pyformlang/finite_automaton/epsilon_nfa.py:227
↓ 8 callersMethod_add_epsilon_transition_in_enfa_between
(self, state0, state1)
pyformlang/regular_expression/regex.py:247
↓ 8 callersMethod_get_next_state_enfa
(self)
pyformlang/regular_expression/regex.py:169
↓ 8 callersMethodaccepts
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 callersMethodeclose
Compute the epsilon closure of a state Parameters ---------- state : :class:`~pyformlang.finite_automaton.State`
pyformlang/finite_automaton/epsilon_nfa.py:190
↓ 8 callersFunctionget_example_text_duplicate
Duplicate text
pyformlang/cfg/tests/test_cfg.py:916
↓ 8 callersMethodinsert
Insert new element
pyformlang/finite_automaton/hopcroft_processing_list.py:29
↓ 8 callersMethodis_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 callersMethodremove_start_state
remove an initial state Parameters ----------- state : :class:`~pyformlang.finite_automaton.State` The new initi
pyformlang/finite_automaton/finite_automaton.py:224
↓ 8 callersMethodto_deterministic
Transforms the epsilon-nfa into a dfa Returns ---------- dfa : :class:`~pyformlang.finite_automaton\ .Deterministic
pyformlang/finite_automaton/epsilon_nfa.py:333
↓ 8 callersMethodto_regex
Tranforms the EpsilonNFA to a regular expression Returns ---------- regex : :class:`~pyformlang.regular_expression.Regex`
pyformlang/finite_automaton/regexable.py:11
↓ 8 callersMethodunion
Makes the union of two regexable objects Parameters ---------- other : :class:`~pyformlang.finite_automaton.Regexable`
pyformlang/finite_automaton/regexable.py:21
↓ 7 callersMethodcopy
Copies the current feature structure Parameters ---------- already_copied : dict A dictionary containing the par
pyformlang/fcfg/feature_structure.py:32
↓ 7 callersFunctionget_enfa_example0
Gives an example ENFA Accepts a*b
pyformlang/finite_automaton/tests/test_epsilon_nfa.py:694
↓ 7 callersMethodget_number_transitions
Gives the number of transitions describe by the deterministic \ function Returns ---------- n_transitions : int
pyformlang/finite_automaton/transition_function.py:148
↓ 7 callersMethodis_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 callersMethodto_cfg
Turns the regex into a context-free grammar. Parameters ---------- starting_symbol : :class:`~pyformlang.cfg.Variabl
pyformlang/regular_expression/regex.py:286
↓ 7 callersMethodto_cfg_combined_variable
Conversion used in the to_pda method
pyformlang/pda/cfg_variable_converter.py:53
↓ 7 callersMethodto_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 callersMethodto_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 callersMethodto_state
Convert to a state
pyformlang/pda/utils.py:19
↓ 6 callersMethod__init__
(self, value)
pyformlang/regular_expression/regex_objects.py:16
↓ 6 callersMethodcontains
Gives the membership of a word to the grammar Parameters ---------- word : iterable of :class:`~pyformlang.cfg.Terminal`
pyformlang/fcfg/fcfg.py:76
↓ 6 callersFunctionget_enfa_example1
Gives and example ENFA Accepts c
pyformlang/finite_automaton/tests/test_epsilon_nfa.py:712
↓ 6 callersFunctionget_next_free
Get free next state or symbol
pyformlang/pda/pda.py:694
↓ 6 callersMethodget_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 callersMethodget_number_transitions
Get the number of transitions in the FST Returns ---------- n_transitions : int The number of transitions
pyformlang/fst/fst.py:85
↓ 6 callersMethodget_stack_symbol_from
Get a stack symbol
pyformlang/cfg/pda_object_creator.py:30
↓ 6 callersMethodget_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 callersMethodis_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 callersMethodremove_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 callersMethodto_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 callersMethodto_stack_symbol
Convert to a stack symbol
pyformlang/pda/utils.py:33
↓ 6 callersFunctionto_terminal
Transformation into a terminal
pyformlang/cfg/utils.py:14
↓ 6 callersMethodto_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 callersMethodfrom_regex
Create a recursive automaton from regular expression Parameters ----------- regex : :class:`~pyformlang.regular_expression.R
pyformlang/rsa/recursive_automaton.py:98
↓ 5 callersMethodgenerate_epsilon
Whether the grammar generates epsilon or not Returns ---------- generate_epsilon : bool Whether epsilon is gener
pyformlang/cfg/cfg.py:161
↓ 5 callersMethodget_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 callersMethodget_dereferenced
Get the dereferences version of the feature structure. For internal usage.
pyformlang/fcfg/feature_structure.py:125
↓ 5 callersMethodget_edges
Gets the edges Returns ---------- edges : generator of (:class:`~pyformlang.finite_automaton.State`, \ :class:`~
pyformlang/finite_automaton/transition_function.py:168
↓ 5 callersMethodget_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 callersMethodget_llone_parse_tree
Get LL(1) parse Tree Parameters ---------- word : list The word to parse Returns ------
pyformlang/cfg/llone_parser.py:193
↓ 5 callersMethodintersection
Compute the intersection with an other object Equivalent to: >> fst and indexed_grammar
pyformlang/fst/fst.py:209
↓ 5 callersMethodis_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 callersMethodis_incomplete
Check if a state is incomplete
pyformlang/fcfg/state.py:27
next →1–100 of 945, ranked by callers