Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] pandas migration, text edition #97

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Again, a fix for base changes.
  • Loading branch information
sstanovnik committed Aug 12, 2016
commit d6bf42ae9daa4604fb3376f9408cfdf78a7e33b6
4 changes: 2 additions & 2 deletions orangecontrib/text/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __init__(self, domain=None, X=None, Y=None, metas=None, text_features=None,
# we may been to transfer some properties if copying from another table,
# because we need the domain later on
if kwargs and all_kwargs_are_pandas and 'data' in kwargs and isinstance(kwargs['data'], TableBase):
self._transfer_properties(kwargs['data'], transfer_domain=True)
self.__finalize__(kwargs['data'])

if self.domain is not None and text_features is None:
self._infer_text_features()
Expand Down Expand Up @@ -211,7 +211,7 @@ def extend_corpus(self, metadata, Y):
result = pd.concat([self, new], axis=0, copy=False)
result[self._TOKENS_COLUMN] = np.nan
# pandas concatenation doesn't transfer properties
result._transfer_properties(self, transfer_domain=True)
result.__finalize__(self)
return result

def extend_attributes(self, X, feature_names, var_attrs=None):
Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/text/widgets/owgeomap.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class OWGeoMap(widget.OWWidget):
name = "GeoMap"
priority = 20000
icon = "icons/GeoMap.svg"
inputs = [("Data", Table, "on_data")]
inputs = [("Data", TableBase, "on_data")]
outputs = [('Corpus', Corpus)]

want_main_area = False
Expand Down