This repository has been copied from sshniro/line-segmentation-algorithm-to-gcp-vision but modified to be able to use in web browser and included dependencies.
<script type="module">
import * as algo from './line-segmentation-algorithm-to-gcp-vision.js';
window.addEventListener('DOMContentLoaded', (event) => {
let data = {};// this data is the response from Google Vision API. The data must contain `responses` property inside.
console.log(algo.initLineSegmentation(data['responses'][0]));
});
</script>