Skip to content

Commit

Permalink
fix: move text to first position
Browse files Browse the repository at this point in the history
  • Loading branch information
HLasse committed Jan 1, 2023
1 parent 17b0133 commit 2d5c29c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/textdescriptives/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ def extract_dict(
+ f"Valid metrics are: {valid_metrics}",
)
extracted_metrics: Dict[str, Any] = {}
if include_text:
extracted_metrics["text"] = docs.text
for component in metrics:
if component == "quality":
extracted_metrics.update(__get_quality(docs))
elif component == "descriptive_stats":
extracted_metrics.update(__get_descriptive_stats_dict(docs))
else:
extracted_metrics.update(getattr(docs._, component))
if include_text:
extracted_metrics["text"] = docs.text

return [extracted_metrics]

Expand Down

0 comments on commit 2d5c29c

Please sign in to comment.