Skip to content
This repository has been archived by the owner on Jan 17, 2018. It is now read-only.

Storage improvement #8

Open
Oliviergg opened this issue Apr 24, 2012 · 4 comments
Open

Storage improvement #8

Oliviergg opened this issue Apr 24, 2012 · 4 comments
Assignees

Comments

@Oliviergg
Copy link
Collaborator

  • Factorize common code in inMemoryStorage and FileStorage => A new class Storage
  • Use a JSON to format data to save
  • Others params need to be saved : Language, ignore_word, ...
  • New test need to be done in 005_inMemoryStorage
@alexandru
Copy link
Owner

Cool :-)

Oliviergg added a commit that referenced this issue Apr 25, 2012
…e<Storage. Added ActAsStorable : set the instance variable list to be saved by Storage
@ghost ghost assigned Oliviergg Apr 25, 2012
@MadBomber
Copy link

Observation: just did some testing under ruby 2.0.0p247 using the :cat and :dog example where the class names/labels are defined as symbols. When the training set is sent to file storage and then later retrieved in a new process the class names/labels are now returned from #classify as strings instead of the expected symbols.

@alexandru
Copy link
Owner

@MadBomber thanks for the report, I'll test.

@himanshu-saxena
Copy link

Hi @alexandru ,

I trying to save the training set into a text file by below line:

store = StuffClassifier::FileStorage.new('doc/classifier_storage.txt')

and then
cls = StuffClassifier::TfIdf.new("#{row[0]}",:storage => store)

getting error "end of buffer reached"

Any suggestions ?

Thanks
Himanshu

alexandru pushed a commit that referenced this issue Jan 15, 2016
…e<Storage. Added ActAsStorable : set the instance variable list to be saved by Storage
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants