You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
445 B

  1. import { AnnotationModel } from './interface'
  2. export class Seq2seqLabel implements AnnotationModel{
  3. constructor(
  4. public id: number,
  5. public text: string,
  6. public user: number,
  7. ) {}
  8. static valueOf(
  9. { id, text, user }:
  10. { id: number, text: string, user: number }
  11. ) {
  12. return new Seq2seqLabel(id, text, user)
  13. }
  14. toObject() {
  15. return {
  16. id: this.id,
  17. text: this.text,
  18. user: this.user
  19. }
  20. }
  21. }