Skip to content

Commit

Permalink
Change default to list/export by highest frequency first
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymo111 authored Aug 19, 2023
1 parent e2083f3 commit fd1d5b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/nexus/Freqlog/Freqlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ def unban_words(self, entries: dict[str: CaseSensitivity], time_added: datetime
logging.info(f"Banning {len(entries)} words - {time_added}")
return [self.unban_word(word, case, time_added) for word, case in entries.items()]

def list_words(self, limit: int = -1, sort_by: WordMetadataAttr = WordMetadataAttr.word,
reverse: bool = False, case: CaseSensitivity = CaseSensitivity.INSENSITIVE) -> list[WordMetadata]:
def list_words(self, limit: int = -1, sort_by: WordMetadataAttr = WordMetadataAttr.frequency,
reverse: bool = True, case: CaseSensitivity = CaseSensitivity.INSENSITIVE) -> list[WordMetadata]:
"""
List words in the store
:param limit: Maximum number of words to return
Expand All @@ -271,8 +271,8 @@ def list_words(self, limit: int = -1, sort_by: WordMetadataAttr = WordMetadataAt
logging.info(f"Listing words, limit {limit}, sort_by {sort_by}, reverse {reverse}, case {case.name}")
return self.backend.list_words(limit, sort_by, reverse, case)

def export_words_to_csv(self, export_path: str, limit: int = -1, sort_by: WordMetadataAttr = WordMetadataAttr.word,
reverse: bool = False, case: CaseSensitivity = CaseSensitivity.INSENSITIVE) -> int:
def export_words_to_csv(self, export_path: str, limit: int = -1, sort_by: WordMetadataAttr = WordMetadataAttr.frequency,
reverse: bool = True, case: CaseSensitivity = CaseSensitivity.INSENSITIVE) -> int:
"""
Export words in the store
:param export_path: Path to csv file to export to
Expand Down

0 comments on commit fd1d5b0

Please sign in to comment.