Skip to content

Commit

Permalink
Merge branch 'tmp'
Browse files Browse the repository at this point in the history
4444e commit. I am adding these changes to master as I mistaken detaxched my branc
  • Loading branch information
gulesh committed May 11, 2021
2 parents 70a9184 + 65af538 commit f535854
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion FastBridgeApp/DefinitionTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_lang_data(words : list, dictionary: str, local_defs_bool : bool = False,
word_list = deque() #has more effieceint appends, and is just as good to iterate over later
#if local_defs: #we want this to be protected because it will take an extra round of iterating over all the words in the INTIAL selction.
#local definitions are hard, because the same word could show up in the section multiple times, so we can't use a dictionary, because then we would have multiple copies of the same key.
Word = namedtuple("Word", columnheaders + row_filters + ["Appearance", "Total_Count_in_Text", "Source_Text"])
Word = namedtuple("Word", columnheaders + row_filters + ["Appearance", "Total_Count_in_Text", "Count_in_Selection", "Source_Text"]) #added Count_in_Selection
apperances = [word[5].replace('_', ".") for word in words]
if local_defs_bool and local_lem:
local_defs =[word[3] for word in words]
Expand Down
6 changes: 4 additions & 2 deletions FastBridgeApp/routers/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ async def simple_result(request : Request, starts : str, ends : str, sourcetexts
data = []
if 'running' in display:
for word in words:
word= word[0]._asdict()
word= word[0]._asdict()
print(word)
#TODO add logic to drop from results without match to current filters
row = dict(word)
data.append(row)
Expand All @@ -139,7 +140,8 @@ async def simple_result(request : Request, starts : str, ends : str, sourcetexts

else:
for word in words_no_dups:
word= word[0]._asdict()
word= word[0]._asdict()
print(word)
row = dict(word)
data.append(row)

Expand Down
2 changes: 1 addition & 1 deletion FastBridgeApp/static/assets/js/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function current_selections() {
"Number",
"Preposition",
"Pronoun",
"Verb",
"Verb",
"CONJUNCTION_Verb_1",
"CONJUNCTION_Verb_2",
"CONJUNCTION_Verb_3",
Expand Down
1 change: 1 addition & 0 deletions FastBridgeApp/static/assets/js/select-restult.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ function get_first_visible_row() {
var rows = document.getElementById('main_table').rows;
console.log(rows)
var j = 0;
console.log(rows[j])
while (isHidden(rows[j])){
j++
first_visible_row = rows[j]
Expand Down

0 comments on commit f535854

Please sign in to comment.