Skip to content

Commit

Permalink
remove unnecessary metadata creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Coniferish committed Oct 4, 2023
1 parent 6f3202e commit cd23a01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion unstructured/partition/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,9 @@ def partition_email(
text=content,
encoding=encoding,
max_partition=max_partition,
metadata_filename=metadata_filename or filename,
min_partition=min_partition,
languages=[""],
include_metadata=False, # metadata is overwritten later, so no need to compute it here
)

for idx, element in enumerate(elements):
Expand Down
2 changes: 2 additions & 0 deletions unstructured/partition/msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ def partition_msg(
elements = partition_html(
text=text,
languages=[""],
include_metadata=False, # metadata is overwritten later, so no need to compute it here
)
else:
elements = partition_text(
text=text,
max_partition=max_partition,
min_partition=min_partition,
languages=[""],
include_metadata=False, # metadata is overwritten later, so no need to compute it here
)

metadata = build_msg_metadata(
Expand Down

0 comments on commit cd23a01

Please sign in to comment.