Skip to content

Commit e8df728

Browse files
committed
Add proof observable to frontend parse service
1 parent 73646b6 commit e8df728

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

frontend/src/app/services/parse.service.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ export class ParseService {
3838
this.parseResults$,
3939
this.clearOnNewProblem$
4040
);
41+
42+
public proofs$ = this.parse$.pipe(map(extractProofs));
43+
}
44+
45+
function extractProofs(response: ParseResponse) {
46+
const {entailment, contradiction} = response.data.proofs;
47+
return {
48+
entailment: nltk2tableau(entailment),
49+
contradiction: nltk2tableau(contradiction),
50+
};
4151
}
4252

4353
const emptyTableau = (): any => ({nodes: []});

0 commit comments

Comments
 (0)