Skip to content

Commit

Permalink
bugfix: rgx_split inital tag type
Browse files Browse the repository at this point in the history
  • Loading branch information
techofer committed Dec 15, 2024
1 parent 0c36e25 commit cf948b1
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nbs/callbacks/001_basic_ies.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
" try:\n",
" first_span = next(delim_iter)\n",
" if first_span.start != 0:\n",
" yield(initial_tag,text[:first_span.start])\n",
" yield(Span(initial_tag),text[:first_span.start])\n",
" except StopIteration:\n",
" return\n",
" prev_span = first_span\n",
Expand Down
22 changes: 22 additions & 0 deletions spannerlib/_modidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@
'spannerlib/adding_inference_rules_to_term_graph.py'),
'spannerlib.adding_inference_rules_to_term_graph.AddRulesToTermGraph.run_pass': ( 'adding_inference_rules_to_term_graph.html#addrulestotermgraph.run_pass',
'spannerlib/adding_inference_rules_to_term_graph.py')},
'spannerlib.banchmark.covid': { 'spannerlib.banchmark.covid.AggDocumentTags': ( 'banchmark/covid.html#aggdocumenttags',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.LemmaFromList': ( 'banchmark/covid.html#lemmafromlist',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.LemmaFromList.__call__': ( 'banchmark/covid.html#lemmafromlist.__call__',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.LemmaFromList.__init__': ( 'banchmark/covid.html#lemmafromlist.__init__',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.PosFromList': ( 'banchmark/covid.html#posfromlist',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.PosFromList.__call__': ( 'banchmark/covid.html#posfromlist.__call__',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.PosFromList.__init__': ( 'banchmark/covid.html#posfromlist.__init__',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.agg_mention': ( 'banchmark/covid.html#agg_mention',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.rewrite': ( 'banchmark/covid.html#rewrite',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.rewrite_docs': ( 'banchmark/covid.html#rewrite_docs',
'spannerlib/banchmark/covid.py'),
'spannerlib.banchmark.covid.split_sentence': ( 'banchmark/covid.html#split_sentence',
'spannerlib/banchmark/covid.py')},
'spannerlib.data_types': { 'spannerlib.data_types.AGGFunction': ( 'primitive_data_types.html#aggfunction',
'spannerlib/data_types.py'),
'spannerlib.data_types.FreeVar': ('primitive_data_types.html#freevar', 'spannerlib/data_types.py'),
Expand Down
2 changes: 2 additions & 0 deletions spannerlib/data_types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""data types used by the engine etc to encode rules relations etc"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/006_primitive_data_types.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions spannerlib/engine.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Execution spannerlog commands"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/010_engine.ipynb.

# %% auto 0
Expand Down
2 changes: 1 addition & 1 deletion spannerlib/ie_func/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def rgx_split(delim, # the delimeter pattern to split on
try:
first_span = next(delim_iter)
if first_span.start != 0:
yield(initial_tag,text[:first_span.start])
yield(Span(initial_tag),text[:first_span.start])
except StopIteration:
return
prev_span = first_span
Expand Down
2 changes: 2 additions & 0 deletions spannerlib/ie_func/rust_spanner_regex.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""This module contains implementation of regex ie functions using the rust package `enum-spanner-rs`"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/callbacks/04d_rust_spanner_regex.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions spannerlib/micro_passes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""passes over the AST of a statement to do semantic checks and register state in the session object"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/020_micro_passes.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions spannerlib/opt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""This file contains implementation of passes that optimize the term graph structure."""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/025_query_optimizations.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions spannerlib/ra.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""relation algebra operations and ie function calculation operations"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/008_extended_RA_operations.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions spannerlib/span.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Span class and how to interface it with pandas"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/005_spans_and_pandas.ipynb.

# %% auto 0
Expand Down
2 changes: 2 additions & 0 deletions spannerlib/term_graph.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Term graphs that encode logic of rules as graphs over RA operators and ie function executions"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/009_term_graphs.ipynb.

# %% auto 0
Expand Down

0 comments on commit cf948b1

Please sign in to comment.