To start with try using watson NaturalLanguageUnderstanding/Alchemy libraries. Using which I was able to extract important keywords from my statements, example :
Input : Hey! I am having issues with my laptop screen
Output : laptop screen issues hardware.
not just rephrasing but using NLU you can get the following details of your input statement, like for above statement you can get details for the following categories:
Language like “en”, Entities, Concepts, Keywords like "laptop screen“ , “issues” with details like relevance, text, keyword emotion, sentiment.
Categories with details like labels, relevance score.
SemanticRoles with details like sentence, it's subject, action and object
Along with this you can use the tone analyzer to get the prominent tone of the statement like, fear, anger, happy, disgust etc.
following is the code sample for watson libraries
note : waston libs are not free but gives one month trial, so you can start with this and then once you get hold of the concepts then switch to other open source libraries and figure out similar libraries and functions
NaturalLanguageUnderstanding service = new NaturalLanguageUnderstanding(
NaturalLanguageUnderstanding.VERSION_DATE_2017_02_27,
WatsonConfiguration.getAlchemyUserName(),
WatsonConfiguration.getAlchemyPassword());
//ConceptsOptions
ConceptsOptions conceptOptions = new ConceptsOptions.Builder()
.limit(10)
.build();
//CategoriesOptions
CategoriesOptions categoriesOptions = new CategoriesOptions();
//SemanticOptions
SemanticRolesOptions semanticRoleOptions = new SemanticRolesOptions.Builder()
.entities(true)
.keywords(true)
.limit(10)
.build();
EntitiesOptions entitiesOptions = new EntitiesOptions.Builder()
.emotion(true)
.sentiment(true)
.limit(10)
.build();
KeywordsOptions keywordsOptions = new KeywordsOptions.Builder()
.emotion(true)
.sentiment(true)
.limit(10)
.build();
Features features = new Features.Builder()
.entities(entitiesOptions)
.keywords(keywordsOptions)
.concepts(conceptOptions)
.categories(categoriesOptions)
.semanticRoles(semanticRoleOptions)
.build();
AnalyzeOptions parameters = new AnalyzeOptions.Builder()
.text(inputText)
.features(features)
.build();
AnalysisResults response = service
.analyze(parameters)
.execute();
System.out.println(response);