Skip to content

Commit

Permalink
refactor: clean up samples and tests (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and Ace Nassri committed Nov 15, 2022
1 parent 7ed2b6d commit fc20959
Show file tree
Hide file tree
Showing 132 changed files with 2,054 additions and 2,206 deletions.
33 changes: 16 additions & 17 deletions automl/language/entity-extraction/create-dataset.v1beta1.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
/**
* Copyright 2019, Google LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

`use strict`;
'use strict';
async function main(
projectId = 'YOUR_PROJECT_ID',
computeRegion = 'YOUR_REGION_NAME',
datasetName = 'YOUR_DATASET_NAME'
) {
// [START automl_natural_language_entity_create_dataset]
const automl = require(`@google-cloud/automl`);
const util = require(`util`);
const automl = require('@google-cloud/automl');
const util = require('util');
const client = new automl.v1beta1.AutoMlClient();

/**
Expand Down
31 changes: 15 additions & 16 deletions automl/language/entity-extraction/create-model.v1beta1.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
/**
* Copyright 2019, Google LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

`use strict`;
'use strict';
async function main(
projectId = 'YOUR_PROJECT_ID',
computeRegion = 'YOUR_REGION_NAME',
datasetId = 'YOUR_DATASET_NAME',
modelName = 'YOUR_MODEL_NAME'
) {
// [START automl_natural_language_entity_create_model]
const automl = require(`@google-cloud/automl`);
const automl = require('@google-cloud/automl');
const client = new automl.v1beta1.AutoMlClient();

/**
Expand Down
31 changes: 15 additions & 16 deletions automl/language/entity-extraction/delete-dataset.v1beta1.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
/**
* Copyright 2019, Google LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

`use strict`;
'use strict';
async function main(
projectId = 'YOUR_PROJECT_ID',
computeRegion = 'YOUR_REGION_NAME',
datasetId = 'YOUR_DATASET_ID'
) {
// [START automl_natural_language_entity_delete_dataset]
const automl = require(`@google-cloud/automl`);
const automl = require('@google-cloud/automl');
const client = new automl.v1beta1.AutoMlClient();

/**
Expand Down
33 changes: 16 additions & 17 deletions automl/language/entity-extraction/delete-model.v1beta1.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
/**
* Copyright 2019, Google LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

`use strict`;
`use strict`;
async function main(
projectId = 'YOUR_PROJECT_ID',
computeRegion = 'YOUR_REGION_NAME',
modelId = 'YOUR_MODEL_ID'
) {
// [START automl_natural_language_entity_delete_model]
const automl = require(`@google-cloud/automl`);
const automl = require('@google-cloud/automl');
const client = new automl.v1beta1.AutoMlClient();

/**
Expand Down
31 changes: 15 additions & 16 deletions automl/language/entity-extraction/deploy-model.v1beta1.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
/**
* Copyright 2019, Google LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

`use strict`;
'use strict';
async function main(
projectId = 'YOUR_PROJECT_ID',
computeRegion = 'YOUR_REGION_NAME',
modelId = 'YOUR_MODEL_ID'
) {
// [START automl_natural_language_entity_deploy_model]
const automl = require(`@google-cloud/automl`);
const automl = require('@google-cloud/automl');
const client = new automl.v1beta1.AutoMlClient();

/**
Expand Down
34 changes: 17 additions & 17 deletions automl/language/entity-extraction/display-evaluation.v1beta1.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
/**
* Copyright 2019, Google LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

`use strict`;
async function main(
projectId = 'YOUR_PROJECT_ID',
computeRegion = 'YOUR_REGION_NAME',
modelId = 'YOUR_MODEL_ID',
filter = 'YOUR_FILTER_EXPRESSION'
) {
// [START automl_natural_language_entity_display_evaluation]
const automl = require(`@google-cloud/automl`);
const math = require(`mathjs`);
const automl = require('@google-cloud/automl');
const math = require('mathjs');
const client = new automl.v1beta1.AutoMlClient();

/**
Expand Down
31 changes: 15 additions & 16 deletions automl/language/entity-extraction/export-data.v1beta1.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
/**
* Copyright 2019, Google LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

`use strict`;
'use strict';
async function main(
projectId = 'YOUR_PROJECT_ID',
computeRegion = 'YOUR_REGION_NAME',
datasetId = 'YOUR_DATASET_ID',
gcsOutputUri = 'GCS_OUTPUT_URI'
) {
// [START automl_natural_language_entity_export_data]
const automl = require(`@google-cloud/automl`);
const automl = require('@google-cloud/automl');
const client = new automl.v1beta1.AutoMlClient();

/**
Expand Down
34 changes: 17 additions & 17 deletions automl/language/entity-extraction/get-dataset.v1beta1.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
/**
* Copyright 2019, Google LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

`use strict`;
async function main(
projectId = 'YOUR_PROJECT_ID',
computeRegion = 'YOUR_REGION_NAME',
datasetId = 'YOUR_DATASET_ID'
) {
// [START automl_natural_language_entity_get_dataset]
const automl = require(`@google-cloud/automl`);
const util = require(`util`);
const automl = require('@google-cloud/automl');
const util = require('util');
const client = new automl.v1beta1.AutoMlClient();

/**
Expand Down
33 changes: 16 additions & 17 deletions automl/language/entity-extraction/get-model-evaluation.v1beta1.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
/**
* Copyright 2019, Google LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

`use strict`;
'use strict';
async function main(
projectId = 'YOUR_PROJECT_ID',
computeRegion = 'YOUR_REGION_NAME',
modelId = 'YOUR_MODEL_ID',
modelEvaluationId = 'YOUR_MODEL_EVALUATION_ID'
) {
// [START automl_natural_language_entity_get_model_evaluation]
const automl = require(`@google-cloud/automl`);
const math = require(`mathjs`);
const automl = require('@google-cloud/automl');
const math = require('mathjs');
const client = new automl.v1beta1.AutoMlClient();

/**
Expand Down
Loading

0 comments on commit fc20959

Please sign in to comment.