File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
src/Sentiment/Wikiled.Sentiment.Analysis/Processing Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 11using System ;
2+ using System . Threading . Tasks ;
23using Wikiled . MachineLearning . Mathematics ;
34using Wikiled . Sentiment . Analysis . Pipeline ;
45using Wikiled . Sentiment . Text . Aspects ;
@@ -43,6 +44,8 @@ public interface ITestingClient
4344
4445 IObservable < ProcessingContext > Process ( IObservable < IParsedDocumentHolder > reviews ) ;
4546
47+ Task < ProcessingContext > Process ( IParsedDocumentHolder review ) ;
48+
4649 void Save ( string path ) ;
4750 }
4851}
Original file line number Diff line number Diff line change 33using System . IO ;
44using System . Reactive . Linq ;
55using System . Threading ;
6+ using System . Threading . Tasks ;
67using System . Xml . Linq ;
78using Wikiled . Arff . Extensions ;
89using Wikiled . Arff . Logic ;
@@ -140,6 +141,17 @@ public IObservable<ProcessingContext> Process(IObservable<IParsedDocumentHolder>
140141 return documentSelector ;
141142 }
142143
144+ public async Task < ProcessingContext > Process ( IParsedDocumentHolder review )
145+ {
146+ if ( review == null )
147+ {
148+ throw new ArgumentNullException ( nameof ( review ) ) ;
149+ }
150+
151+ var result = await Process ( Observable . Never < IParsedDocumentHolder > ( ) . StartWith ( review ) ) ;
152+ return result ;
153+ }
154+
143155 public void Save ( string path )
144156 {
145157 path . EnsureDirectoryExistence ( ) ;
You can’t perform that action at this time.
0 commit comments