Skip to content

Commit

Permalink
updated tree expansion method
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonf committed Dec 13, 2023
1 parent 6298a66 commit 0785d62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from services.basex import basex

from sastadev.treebankfunctions import indextransform
from mwe_query.lcat import expandnonheadwords
from mwe_query.canonicalform import expandfull

import logging

Expand Down Expand Up @@ -104,7 +104,7 @@ def _get_or_create_components(component_slugs, treebank):
def filter_expand(results: ResultSet) -> ResultSet:
for result in results:
try:
result.tree = indextransform(expandnonheadwords(result.tree))
result.tree = expandfull(result.tree)
except Exception:
log.exception('Failed expanding index nodes for sentence')
yield result
Expand Down

0 comments on commit 0785d62

Please sign in to comment.