Search code examples
machine-learningamazon-machine-learning

Returning Text from Amazon Machine Learning


I have a trained model in Amazon ML than can recognize a piece of text in several categories. For example, if give a piece of text to Amazon ML it will return if this piece is a "subject", "content", etc category.

I wonder if it's possible to send a full text and get a return telling me what is the subject and what is the content.


Solution

  • You should think of each ML model as a function, and then you can write code that is integrating these functions.

    For example, one model can represent the function "isSubject", and the second model "isBody", etc. These functions can be built on Amazon ML, and they will return a score between 0 and 1, that you can convert into Boolean in the code that is calling these functions/models.

    You can now take your full text, cut it to pieces and send each piece to the various models you trained, and use the scores that the models return as the basis for your decision regarding the full text.