java - Cloud vision api text detection showing syntax errors -


i have downloaded java vision api project github.

i enabled billing project through developers console , got client_secret project. later adding environment variable google_application_credentials pointing client_secret file. i'm able other operations labeling, face detection , landmark detection. when try execute text_detection code i'm getting these errors. see image here

public void indexdirectory(path inputpath) throws ioexception { list<path> unprocessedimages =     files.walk(inputpath)         .filter(files::isregularfile)         .filter(index::isdocumentunprocessed)         .collect(collectors.tolist()); lists.<path>partition(unprocessedimages, batch_size)     .stream()     .map(this::detecttext)     .flatmap(l -> l.stream())     .filter(this::successfullydetectedtext)     .map(this::extractdescriptions)     .foreach(index::adddocument);} 

this code i've written , i'm getting below errors.

exception in thread "main" java.lang.error: unresolved compilation problems:      files cannot resolved variable     syntax error on tokens, delete these tokens     syntax error on tokens, delete these tokens     syntax error on token(s), misplaced construct(s)     syntax error on tokens, delete these tokens     syntax error on token "-", -- expected     syntax error on tokens, delete these tokens     syntax error on tokens, delete these tokens     syntax error on token ":", enhancedforstatementheaderinit expected after token      @ com.google.cloud.vision.samples.text.textapp.indexdirectory(textapp.java:158)     @ com.google.cloud.vision.samples.text.textapp.main(textapp.java:107) 

i know these syntax error still i'm unable find solution make work.

can please suggest me how can work.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -